resque-unique_by_arity 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/README.md +11 -11
- data/lib/resque/unique_by_arity/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 320160b5cbb9ce7b5347856e8e0ed5b1fb5277ef3d91162870ab984f9b856b93
|
4
|
+
data.tar.gz: 2ca9c526fd23cd3ae036ee6d378e1635f2cf10eb7c27b617eb2b5bc4a1e592eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b99c2055b7740fe7da51b844e558b47c54fac217071ca3522be15b7de1a8b08b7a04d4ed176d1f13bae3ced96740be048699bdc787778a0683e3e5b9d15364a8
|
7
|
+
data.tar.gz: ae6ba4159d5673adccf3bda77140576d5a1f0817e2f0f551dde2663bab865d4f0de8c4d29c37510c8c6ae49871be8405b35e567a968b82696b1d5e981cd53619
|
data/Gemfile
CHANGED
@@ -2,8 +2,8 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
4
|
|
5
|
-
gem 'resque-unique_in_queue'
|
6
|
-
gem 'resque-unique_at_runtime'
|
5
|
+
gem 'resque-unique_in_queue'
|
6
|
+
gem 'resque-unique_at_runtime'
|
7
7
|
|
8
8
|
group :test do
|
9
9
|
unless ENV['TRAVIS']
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ class MyJob
|
|
37
37
|
def self.perform(arg)
|
38
38
|
# do stuff
|
39
39
|
end
|
40
|
-
include UniqueByArity
|
40
|
+
include Resque::Plugins::UniqueByArity.new(
|
41
41
|
arity_for_uniqueness: 1,
|
42
42
|
lock_after_execution_period: 60,
|
43
43
|
runtime_lock_timeout: 60 * 60 * 24 * 5, # 5 days
|
@@ -74,7 +74,7 @@ class MyJob
|
|
74
74
|
def self.perform(my, cat, is, the, best, opts = {})
|
75
75
|
# Only the first 3: [my, cat, is] will be considered for determination of uniqueness
|
76
76
|
end
|
77
|
-
include UniqueByArity
|
77
|
+
include Resque::Plugins::UniqueByArity.new(
|
78
78
|
arity_for_uniqueness: 3,
|
79
79
|
unique_at_runtime: true
|
80
80
|
)
|
@@ -94,7 +94,7 @@ class MyJob
|
|
94
94
|
#
|
95
95
|
# MyJob.perform has the following required parameters: [:my, :cat], which is not enough to satisfy the configured arity_for_uniqueness of 3
|
96
96
|
end
|
97
|
-
include UniqueByArity
|
97
|
+
include Resque::Plugins::UniqueByArity.new(
|
98
98
|
arity_for_uniqueness: 3,
|
99
99
|
arity_validation: :warning, # or :skip, :error, or an error class to be raised, e.g. RuntimeError
|
100
100
|
unique_at_runtime: true
|
@@ -112,7 +112,7 @@ class MyJob
|
|
112
112
|
def self.perform(arg1)
|
113
113
|
# do stuff
|
114
114
|
end
|
115
|
-
include UniqueByArity
|
115
|
+
include Resque::Plugins::UniqueByArity.new(
|
116
116
|
arity_for_uniqueness: 1,
|
117
117
|
lock_after_execution_period: 60,
|
118
118
|
unique_at_runtime: true
|
@@ -129,7 +129,7 @@ class MyJob
|
|
129
129
|
def self.perform(arg1)
|
130
130
|
# do stuff
|
131
131
|
end
|
132
|
-
include UniqueByArity
|
132
|
+
include Resque::Plugins::UniqueByArity.new(
|
133
133
|
arity_for_uniqueness: 1,
|
134
134
|
runtime_lock_timeout: 60 * 60 * 24 * 5, # 5 days
|
135
135
|
unique_at_runtime: true
|
@@ -146,7 +146,7 @@ class MyJob
|
|
146
146
|
def self.perform(arg1)
|
147
147
|
# do stuff
|
148
148
|
end
|
149
|
-
include UniqueByArity
|
149
|
+
include Resque::Plugins::UniqueByArity.new(
|
150
150
|
arity_for_uniqueness: 1,
|
151
151
|
unique_at_runtime: true
|
152
152
|
)
|
@@ -175,7 +175,7 @@ class MyJob
|
|
175
175
|
def self.perform(arg1)
|
176
176
|
# do stuff
|
177
177
|
end
|
178
|
-
include UniqueByArity
|
178
|
+
include Resque::Plugins::UniqueByArity.new(
|
179
179
|
arity_for_uniqueness: 1,
|
180
180
|
unique_in_queue: true
|
181
181
|
)
|
@@ -191,7 +191,7 @@ class MyJob
|
|
191
191
|
def self.perform(arg1)
|
192
192
|
# do stuff
|
193
193
|
end
|
194
|
-
include UniqueByArity
|
194
|
+
include Resque::Plugins::UniqueByArity.new(
|
195
195
|
arity_for_uniqueness: 1,
|
196
196
|
unique_across_queues: true
|
197
197
|
)
|
@@ -233,7 +233,7 @@ class MyJob
|
|
233
233
|
def self.perform(arg1)
|
234
234
|
# do stuff
|
235
235
|
end
|
236
|
-
include UniqueByArity
|
236
|
+
include Resque::Plugins::UniqueByArity.new(
|
237
237
|
arity_for_uniqueness: 1,
|
238
238
|
unique_at_runtime: true,
|
239
239
|
runtime_lock_timeout: 60 * 60 * 24 * 5, # 5 days
|
@@ -252,7 +252,7 @@ class MyJob
|
|
252
252
|
def self.perform(arg1)
|
253
253
|
# do stuff
|
254
254
|
end
|
255
|
-
include UniqueByArity
|
255
|
+
include Resque::Plugins::UniqueByArity.new(
|
256
256
|
arity_for_uniqueness: 1,
|
257
257
|
unique_at_runtime: true,
|
258
258
|
runtime_lock_timeout: 60 * 60 * 24 * 5, # 5 days
|
@@ -274,7 +274,7 @@ class MyJob
|
|
274
274
|
def self.perform(arg1)
|
275
275
|
# do stuff
|
276
276
|
end
|
277
|
-
include UniqueByArity
|
277
|
+
include Resque::Plugins::UniqueByArity.new(
|
278
278
|
#...
|
279
279
|
)
|
280
280
|
|