resque-unique_by_arity 1.0.3 → 1.0.5
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: 00cde0223f9209ac2c49d83ffd8994c24f545dec
|
4
|
+
data.tar.gz: 6265a29d80091ab4cf13efbb3960d16319629c1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 877c2c64b4b05ca0acdd4722559421257078a507e123496e147b103844fedfe5c6cf7796b14b292463683c0b96916fe2ecf66658cd3c1ddccbdacc33ba1b9161
|
7
|
+
data.tar.gz: 7ff7957a8f8b43a944ea7b64c8e28eff5b04226a5236662dbe5855a9d9ed269f5ec9750e71a78a6639c897024952153102dec6049f34490f36cd334422fae5d1
|
@@ -23,12 +23,16 @@ module Resque
|
|
23
23
|
@unique_across_queues = options.key?(:unique_across_queues) ? options[:unique_across_queues] : false
|
24
24
|
# The default config initialization shouldn't trigger any warnings.
|
25
25
|
if options.keys.length > 0 && @logger
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
log ":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
|
27
|
+
log ":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
|
28
|
+
log ":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
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
def log(msg)
|
33
|
+
Resque::UniqueByArity.unique_log(msg, self)
|
34
|
+
end
|
35
|
+
|
32
36
|
def to_hash
|
33
37
|
{
|
34
38
|
logger: logger,
|
@@ -58,7 +62,7 @@ module Resque
|
|
58
62
|
end
|
59
63
|
case arity_validation
|
60
64
|
when :warning then
|
61
|
-
|
65
|
+
log(msg)
|
62
66
|
when :error then
|
63
67
|
raise ArgumentError, msg
|
64
68
|
else
|