resque-unique_at_runtime 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/resque/unique_at_runtime/configuration.rb +6 -2
- data/lib/resque/unique_at_runtime/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66b655bcc2e814543c5faff1fd736b3064d0e4bdc63fe9aa5b21e177213e13f5
|
4
|
+
data.tar.gz: a50033a081961bc72febdfed19f83d79be0fc7ca54b0907e775e9af62b9d48bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66376f37249d17ba9c78e85c11e183b563e1ca7b2ccf214ffdce939b522f16ddfeb29f8b59b9173b6be800c4c42cc38ea72a45530bd649ec45612d73e43ae2c2
|
7
|
+
data.tar.gz: c9c6a1103ce7df14959c6803809bcab42848ce34412ef1e9e67d01b7f5a3b2804c48bd5be4f7a2695111b67a7709055583c471d96ce4b675983e696f819a1aac
|
data/README.md
CHANGED
@@ -19,15 +19,15 @@ A [semanticaly versioned](http://semver.org/)
|
|
19
19
|
[Resque](https://github.com/resque/resque) plugin which ensures for a given
|
20
20
|
queue, that only one worker is working on a job at any given time.
|
21
21
|
|
22
|
-
Resque::Plugins::UniqueAtRuntime differs from [resque-lonely_job](https://github.com/wallace/resque-lonely_job) in that it is compatible with, and can be used at the same time as, [resque-
|
22
|
+
Resque::Plugins::UniqueAtRuntime (this gem) differs from [resque-lonely_job](https://github.com/wallace/resque-lonely_job) in that it is compatible with, and can be used at the same time as, [resque-unique_in_queue](https://github.com/pboling/resque-unique_in_queue).
|
23
23
|
|
24
|
-
Resque::Plugins::UniqueAtRuntime differs from [
|
24
|
+
Resque::Plugins::UniqueAtRuntime differs from [resque-unique_in_queue](https://github.com/pboling/resque-unique_in_queue) in that `resque-unique_in_queue` offers **queue-time** uniqueness, while `resque-unique_at_runtime` offers **runtime** uniqueness. The same difference applies to other queue-time uniqueness gems: [resque-queue-lock](https://github.com/mashion/resque-queue-lock), [resque-lock](https://github.com/defunkt/resque-lock).
|
25
25
|
|
26
26
|
Runtime uniqueness without queue-time uniqueness means the same job may be queued multiple times but you're guaranteed that first job queued will run to completion before subsequent jobs are run.
|
27
27
|
|
28
28
|
However, you can use both runtime and queue-time uniqueness together in the same project.
|
29
29
|
|
30
|
-
To use `resque-
|
30
|
+
To use `resque-unique_in_queue` and `resque-unique_at_runtime` together, with fine control of per job configuration of uniqueness at runtime and queue-time, it is recommended to use [resque-unique_by_arity](https://github.com/pboling/resque-unique_by_arity).
|
31
31
|
|
32
32
|
NOTE: There is a *strong* possibility that subsequent jobs are re-ordered due to
|
33
33
|
the implementation of
|
@@ -21,7 +21,7 @@ module Resque
|
|
21
21
|
@lock_timeout = options.key?(:lock_timeout) ? options[:lock_timeout] : DEFAULT_LOCK_TIMEOUT
|
22
22
|
@requeue_interval = options.key?(:requeue_interval) ? options[:requeue_interval] : DEFAULT_REQUEUE_INTERVAL
|
23
23
|
env_debug = ENV['RESQUE_DEBUG']
|
24
|
-
@debug_mode = options.key?(:debug_mode) ? options[:debug_mode] : env_debug == 'true' || (env_debug.is_a?(String) && env_debug.match?(/runtime/))
|
24
|
+
@debug_mode = !!(options.key?(:debug_mode) ? options[:debug_mode] : env_debug == 'true' || (env_debug.is_a?(String) && env_debug.match?(/runtime/)))
|
25
25
|
end
|
26
26
|
|
27
27
|
def unique_logger
|
@@ -39,7 +39,11 @@ module Resque
|
|
39
39
|
def to_hash
|
40
40
|
{
|
41
41
|
logger: logger,
|
42
|
-
log_level: log_level
|
42
|
+
log_level: log_level,
|
43
|
+
debug_mode: debug_mode,
|
44
|
+
unique_at_runtime_key_base: unique_at_runtime_key_base,
|
45
|
+
lock_timeout: lock_timeout,
|
46
|
+
requeue_interval: requeue_interval
|
43
47
|
}
|
44
48
|
end
|
45
49
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-unique_at_runtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter H. Boling
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-11-
|
12
|
+
date: 2018-11-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|