resque-retry 1.3.1 → 1.3.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: a1679744710a2e1d18001de39c1171cf671f1ef8
4
- data.tar.gz: 0fa6ac27d73a17b22602062250f8048374a3e274
3
+ metadata.gz: 3e009bab760d817a59eb5969981a4449b84b3b8a
4
+ data.tar.gz: 293ad2734c8083e095456b278c7fcf3f5aa724ca
5
5
  SHA512:
6
- metadata.gz: 585ad0f3aff31ea85fb335b552e873210bb2c9d931e3e4dd8d36165903e89cf188bea91bcce1a6ddea6b6189de13287d5e867d3b3aa61d9edbfe33b791d4ec92
7
- data.tar.gz: bae8d6b35f22d5878c1acda5ae1e48f9d406a4637ed0d9ea29fd39c1f49f894ddca41a2c05fda9d3fbc26a9f29ef9a31e9bb33dd55e1db7150d004a21b530389
6
+ metadata.gz: a8bb21258513a5f42cb19a228bb46e57d25b57022aefaabca41c81d6c63fc483d44028960b8ec09c2cae0ac8575b6e1041e078c2532b67757117ac419397a190
7
+ data.tar.gz: 4f6ab5ead5467abfa397977c3b5b32c8ce3879b02a60045ac490d6683123fbc1561d4f611753df71d2b1f4874fbae440efd42b8eff2a2b9c547d5b150787277c
data/HISTORY.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## HEAD
2
2
 
3
+ ## 1.3.2 (2014-10-09)
4
+
5
+ * Fixed: Ensure `#constantize` is called on `Job` instance.
6
+
3
7
  ## 1.3.1 (2014-08-13)
4
8
 
5
9
  * Fixed: Job would infinitely retry if DirtyExit exception was always raised.
@@ -39,7 +39,7 @@ module ResqueRetry
39
39
  module Helpers
40
40
  # builds a retry key for the specified job.
41
41
  def retry_key_for_job(job)
42
- klass = Resque::Job.new(nil, nil).constantize(job['class'])
42
+ klass = get_class(job)
43
43
  if klass.respond_to?(:redis_retry_key)
44
44
  klass.redis_retry_key(job['args'])
45
45
  else
@@ -65,12 +65,17 @@ module ResqueRetry
65
65
 
66
66
  # cancels job retry
67
67
  def cancel_retry(job)
68
- klass = Resque.constantize(job['class'])
68
+ klass = get_class(job)
69
69
  retry_key = retry_key_for_job(job)
70
70
  Resque.remove_delayed(klass, *job['args'])
71
71
  Resque.redis.del("failure-#{retry_key}")
72
72
  Resque.redis.del(retry_key)
73
73
  end
74
+
75
+ private
76
+ def get_class(job)
77
+ Resque::Job.new(nil, nil).constantize(job['class'])
78
+ end
74
79
  end
75
80
 
76
81
  end
@@ -1,3 +1,3 @@
1
1
  module ResqueRetry
2
- VERSION = '1.3.1'
2
+ VERSION = '1.3.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-retry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Antins
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-08-13 00:00:00.000000000 Z
13
+ date: 2014-10-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: resque