resque-unique_at_runtime 3.0.0 → 3.0.1

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
  SHA256:
3
- metadata.gz: 645ac4f759c2b0721d782071985fdec3d14de968eeef88ae760c0a6e1deb0c67
4
- data.tar.gz: f2a99e565e17ae87b290b8a834cfb9f6d5d9474fa7ae158eba361344f33c7850
3
+ metadata.gz: 66b655bcc2e814543c5faff1fd736b3064d0e4bdc63fe9aa5b21e177213e13f5
4
+ data.tar.gz: a50033a081961bc72febdfed19f83d79be0fc7ca54b0907e775e9af62b9d48bf
5
5
  SHA512:
6
- metadata.gz: acbfec52b562d31dc543fa4de471700d485cc3654a0ab7813e07a68f029f7d6e43e953e3de849cca9f39f62359ea29b216b2dec3d0e9b3c8a1e9264c595ac777
7
- data.tar.gz: 7941f8e4a0eabd5a222fd832b46f32f73b52b14ec4a94aa842ba948f26037cbc8b1d1c3e115dad91beba494aa40dd925aa26a8f598cb57e88227642ba337d68e
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-solo](https://github.com/neighborland/resque_solo).
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 [resque_solo](https://github.com/neighborland/resque_solo) in that `resque-solo` 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).
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-solo` 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).
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Resque
4
4
  module UniqueAtRuntime
5
- VERSION = '3.0.0'
5
+ VERSION = '3.0.1'
6
6
  end
7
7
  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.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-08 00:00:00.000000000 Z
12
+ date: 2018-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize