resque-unique_by_arity 1.0.1 → 1.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4444b6a7c6bf4b6a8d24ba5d6ecda5b0626e702e
|
4
|
+
data.tar.gz: db5347bfc38db54129cae0afb7af62b0d9596d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ba38bc31db1ac84cc2665a7443265ba98d55377abfc346b65218a81e4d6df174496b7361c48ef6c3a94b89a7030b599ca1b52a1aa01e88396d35d5428709a06
|
7
|
+
data.tar.gz: 0546e76f497598b47b8769159c2ea644ee3f840e482717be9433dbb16a9c2171283ec537d10a7495a30cb455079311e03b818d9ef960a433e85bc68135204d56
|
@@ -17,9 +17,12 @@ module Resque
|
|
17
17
|
@unique_at_runtime = options.key?(:unique_at_runtime) ? options[:unique_at_runtime] : false
|
18
18
|
@unique_in_queue = options.key?(:unique_in_queue) ? options[:unique_in_queue] : false
|
19
19
|
@unique_across_queues = options.key?(:unique_across_queues) ? options[:unique_across_queues] : false
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
# The default config initialization shouldn't trigger any warnings.
|
21
|
+
if options.keys.length > 0
|
22
|
+
warn ":arity_for_uniqueness is set to #{@arity_for_uniqueness}, but no uniqueness enforcement was turned on [:unique_at_runtime, :unique_in_queue, :unique_across_queues]" unless @unique_at_runtime || @unique_in_queue || @unique_across_queues
|
23
|
+
warn ":lock_after_execution_period is set to #{@lock_after_execution_period}, but :unique_at_runtime is not set" if @lock_after_execution_period && !@unique_at_runtime
|
24
|
+
warn ":unique_in_queue and :unique_across_queues should not be set at the same time, as :unique_across_queues will always supercede :unique_in_queue" if @unique_in_queue && @unique_across_queues
|
25
|
+
end
|
23
26
|
end
|
24
27
|
def to_hash
|
25
28
|
{
|