active_job_resque_solo 0.3.1.pre → 0.3.2

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: '0779530df7b0ff6322789944e545c217f6f3f992'
4
- data.tar.gz: 417d3d7404a04ad4ef5554ab9c1e7297f81eb1f5
3
+ metadata.gz: 3389e5a4e6baa27ff036950fe7d33481f11e2e4e
4
+ data.tar.gz: 6a35295a25a4dec30449fdfb37233b3e1eabd2df
5
5
  SHA512:
6
- metadata.gz: 65aa07c7b0b884f4c8c5567f5fc55858b91b3cae21dc3177eb1d8f0278274496dcee8e435cbf71f24145a517af1593cebad43c1c8f25ab341c7403405795dd5c
7
- data.tar.gz: '0608260af69a597c885e61137a4361a261b5a92d19a12977575b1302d3f93a92390e00a0244d92156ccaf4fcac00c016f82a504ed6bb9fc58d08dfd7ad352bcc'
6
+ metadata.gz: 21adde8385e257074f4fe58088ea3ea99eadecd6b48591445feece329c7a6edb06288c60076c2b04970956436df3a74f62abfcc9cd5602acb99861473ab92633
7
+ data.tar.gz: 1cb85b9a297521eec7360dc423fd64e2d6f2768a23605b6bd3a35158f84f9bd7dd5b6449d36bf1ef7b271cfa052857153d22f45abc88b7c8371b34ecbfdb95ba
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.4
5
- - 2.4.1
4
+ - 2.2.0
5
+ - 2.3.0
6
+ - 2.4.0
7
+ - ruby-head
6
8
  before_install: gem install bundler -v 1.15.4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.3.2
2
+
3
+ * Simplifies lock acquisition and tightens its restrictions, reducing chances of duplicate enqueues.
4
+
1
5
  # 0.3.1.pre
2
6
 
3
7
  * Improves Lock efficiency by removing one call to Redis during #extend.
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["kinkadep@gmail.com"]
11
11
 
12
12
  spec.summary = %q{Prevents duplicate ActiveJob+Resque jobs from being enqueued.}
13
- spec.description = %q{If you are using ActiveJob with the Resque Adapter, this gem will help prevent duplicate jobs, based on arguments, from being enqueued to Resque.}
13
+ spec.description = %q{If you are using ActiveJob with the Resque Adapter, this gem will prevent a jobs, based on arguments, from being enqueued to Resque as long as a duplicate is already in queue or executing on a worker.}
14
14
  spec.license = "MIT"
15
15
  spec.homepage = "https://github.com/kinkade/active_job_resque_solo"
16
16
 
@@ -22,6 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
+ spec.required_ruby_version = ">= 2.2.0"
26
+
25
27
  spec.add_dependency "rails", ">= 4.2.0", "< 6"
26
28
 
27
29
  spec.add_development_dependency "byebug"
@@ -42,17 +42,9 @@ module ActiveJob
42
42
 
43
43
  if @redis.set(@key, @uuid, px: px, nx: true)
44
44
  @acquired = @uuid
45
- else
46
- extend_at = Time.now.utc
47
- @acquired = @redis.get(@key)
48
45
  end
49
46
 
50
- # Consider the lock not acquired if it is proven
51
- # that another process has acquired the lock.
52
- #
53
- # It is unlikely that acquired will be nil, but
54
- # it is possible if Redis is slow due to extreme load.
55
- (@acquired.nil? || @acquired == @uuid) ? extend_at : nil
47
+ @acquired == @uuid ? extend_at : nil
56
48
  end
57
49
 
58
50
  def extend
@@ -1,3 +1,3 @@
1
1
  module ActiveJobResqueSolo
2
- VERSION = "0.3.1.pre"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_job_resque_solo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1.pre
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phillip Kinkade
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2017-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -86,8 +86,9 @@ dependencies:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
- description: If you are using ActiveJob with the Resque Adapter, this gem will help
90
- prevent duplicate jobs, based on arguments, from being enqueued to Resque.
89
+ description: If you are using ActiveJob with the Resque Adapter, this gem will prevent
90
+ a jobs, based on arguments, from being enqueued to Resque as long as a duplicate
91
+ is already in queue or executing on a worker.
91
92
  email:
92
93
  - kinkadep@gmail.com
93
94
  executables: []
@@ -123,12 +124,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
124
  requirements:
124
125
  - - ">="
125
126
  - !ruby/object:Gem::Version
126
- version: '0'
127
+ version: 2.2.0
127
128
  required_rubygems_version: !ruby/object:Gem::Requirement
128
129
  requirements:
129
- - - ">"
130
+ - - ">="
130
131
  - !ruby/object:Gem::Version
131
- version: 1.3.1
132
+ version: '0'
132
133
  requirements: []
133
134
  rubyforge_project:
134
135
  rubygems_version: 2.6.6