resque-unique_at_runtime 2.0.2 → 2.0.3

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: 3d3d6b55df9f56bfc4706242b0d7f1f6e47fae6d
4
- data.tar.gz: 816c4042916af3a170e6af35b1978f4f2a3cc338
3
+ metadata.gz: 220f16a02747d08f43f10ea29af60c822326c843
4
+ data.tar.gz: 648b278859a21ce7c2003be5118a3dbd515a9e8a
5
5
  SHA512:
6
- metadata.gz: c61abb7166768391285d3a0478a23d0b63564c134969cd099fd69c05b5cdd2f156aaf529b8b859e91bd40627beb258abb2b4c4d81ba2cc9e678314df92c8cce2
7
- data.tar.gz: d900c6c92ad2cf28f94872ae014044b821ec488b974e78428bfdcec3cfc81ed3c069d93211cdccf06d625b0e47242d7c45a332a326d6291b65a0ffdfbf6108d7
6
+ metadata.gz: d629acacf989b15e31abc4de4f4428bdd68098b7965859415086f7c64d90454e4e72ff1c47ce6ea31330a8fedafd6fbf97ea9fba9a026dd95b43e791b0e7a1e3
7
+ data.tar.gz: 51d6785a56a77a574d71bf3fe2c8a8d05cd843c98a638fbb494a9fd31327cb406030ceee3277e92aa07f1cc0db1cbf5ca1e08f963dd2fe0db5ccece0e59068a5
@@ -3,16 +3,19 @@ require 'resque-unique_at_runtime/version'
3
3
  module Resque
4
4
  module Plugins
5
5
  module UniqueAtRuntime
6
+ LOCK_TIMEOUT = 60 * 60 * 24 * 5
7
+ REQUEUE_INTERVAL = 1
8
+
6
9
  def runtime_lock_timeout_at(now)
7
10
  now + runtime_lock_timeout + 1
8
11
  end
9
12
 
10
13
  def runtime_lock_timeout
11
- self.instance_variable_get(:@runtime_lock_timeout) || 60 * 60 * 24 * 5
14
+ self.instance_variable_get(:@runtime_lock_timeout) || LOCK_TIMEOUT
12
15
  end
13
16
 
14
17
  def runtime_requeue_interval
15
- self.instance_variable_get(:@runtime_requeue_interval) || 1
18
+ self.instance_variable_get(:@runtime_requeue_interval) || REQUEUE_INTERVAL
16
19
  end
17
20
 
18
21
  # Overwrite this method to uniquely identify which mutex should be used
@@ -1,7 +1,7 @@
1
1
  module Resque
2
2
  module Plugins
3
3
  module UniqueAtRuntime
4
- VERSION = "2.0.2"
4
+ VERSION = "2.0.3"
5
5
  end
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: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling