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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9c434bd9ef7b517ac674178db86450d4220458e
4
- data.tar.gz: 7ad486c09cd6dcd27b068172fcf4888975d7ecdf
3
+ metadata.gz: '0779530df7b0ff6322789944e545c217f6f3f992'
4
+ data.tar.gz: 417d3d7404a04ad4ef5554ab9c1e7297f81eb1f5
5
5
  SHA512:
6
- metadata.gz: ab4a3fc4b9a73e1ff7687cd00e648a71a7f7e1206294d453c44dbdde61bf6a29d03e3de2b7544175c1380fca79d5a3755fdc9449eb700146dcd228adaf97fe0a
7
- data.tar.gz: a93fcdacfbfa92cb621ad935062171b5b3437dc452756773e487f87e005fc21ca1d60672b315aabefc237c9a4294d44834551181cf3c0bb3cc53a67a234b9c7b
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 enquing multiple copies of a job.
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
- extend_at = Time.now.utc + (EXECUTE_TTL.to_f / 2)
64
- @redis.multi do |multi|
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
@@ -1,3 +1,3 @@
1
1
  module ActiveJobResqueSolo
2
- VERSION = "0.3.0.pre"
2
+ VERSION = "0.3.1.pre"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_job_resque_solo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.pre
4
+ version: 0.3.1.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phillip Kinkade