active_job_resque_solo 0.3.0.pre → 0.3.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/active_job/plugins/resque/solo/lock.rb +2 -3
- data/lib/active_job_resque_solo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0779530df7b0ff6322789944e545c217f6f3f992'
|
4
|
+
data.tar.gz: 417d3d7404a04ad4ef5554ab9c1e7297f81eb1f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65aa07c7b0b884f4c8c5567f5fc55858b91b3cae21dc3177eb1d8f0278274496dcee8e435cbf71f24145a517af1593cebad43c1c8f25ab341c7403405795dd5c
|
7
|
+
data.tar.gz: '0608260af69a597c885e61137a4361a261b5a92d19a12977575b1302d3f93a92390e00a0244d92156ccaf4fcac00c016f82a504ed6bb9fc58d08dfd7ad352bcc'
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
# 0.3.1.pre
|
2
|
+
|
3
|
+
* Improves Lock efficiency by removing one call to Redis during #extend.
|
4
|
+
|
1
5
|
# 0.3.0.pre
|
2
6
|
|
3
|
-
* Adds locking to prevent two or more processes in a race condition from
|
7
|
+
* Adds locking to prevent two or more processes in a race condition from enqueuing multiple copies of a job.
|
4
8
|
|
5
9
|
* Adds the `solo_lock_key_prefix` directive to set the lock key prefix for your job.
|
6
10
|
|
@@ -60,9 +60,8 @@ module ActiveJob
|
|
60
60
|
|
61
61
|
@redis.watch(@key) do
|
62
62
|
if @redis.get(@key) == @uuid
|
63
|
-
|
64
|
-
|
65
|
-
multi.expire(@key, EXECUTE_TTL.to_i)
|
63
|
+
if @redis.multi{ |multi| multi.expire(@key, EXECUTE_TTL.to_i) }.present?
|
64
|
+
extend_at = Time.now.utc + (EXECUTE_TTL.to_f / 2)
|
66
65
|
end
|
67
66
|
end
|
68
67
|
end
|