mperham-politics 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.rdoc +5 -1
- data/lib/politics/token_worker.rb +1 -1
- metadata +1 -1
data/History.rdoc
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
|
+
== 0.2.4 (2009-01-28)
|
4
|
+
|
5
|
+
* Reduce leader token expiration time to discourage a get/set race condition. (Brian Dainton)
|
6
|
+
|
3
7
|
== 0.2.3 (2009-01-12)
|
4
8
|
|
5
|
-
*
|
9
|
+
* Fix invalid result check in previous change. (Brian Dainton)
|
6
10
|
|
7
11
|
== 0.2.2 (2009-01-07)
|
8
12
|
|
@@ -145,7 +145,7 @@ module Politics
|
|
145
145
|
# The result will tell us if memcached stored our value and therefore
|
146
146
|
# if we are now leader.
|
147
147
|
def nominate
|
148
|
-
result = memcache_client.add(token, worker_name, iteration_length)
|
148
|
+
result = memcache_client.add(token, worker_name, (iteration_length * 0.9).to_i)
|
149
149
|
@leader = (result =~ /\ASTORED/)
|
150
150
|
end
|
151
151
|
|