resque-retry 1.7.2 → 1.7.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
  SHA256:
3
- metadata.gz: 755ea6078469205b32e916d32d7dbb57a668e409d559b32ec7a5b21560a515c8
4
- data.tar.gz: 98e9eb8627d4641771f66e8811d29bfc2e1baab52b5a38809bb4a0005e465480
3
+ metadata.gz: 215fb485738158bbc70e52dc3cfb8ffe0f506cea4eea5000c63bfd0112e1e1ad
4
+ data.tar.gz: d3de2dc53f2d491ef38327723c72fe0fe393caeb611887037128345f1a782a36
5
5
  SHA512:
6
- metadata.gz: 475ca16f0d0814aa68ca14ff1ba2ec30c037526b69432052e8b88940e26964cb6e25ce71282a8161796d91ccae1ebfff23b43956485f5ae6b820e83aa00bb06b
7
- data.tar.gz: 1d6870270be5df0c1a9820879ebfef192bbaa2a7cbe16199e5c8c319bd8b5f7a5a2207105646ebc0a3a99221a1defeab520727053649cfa310025caadc7d1520
6
+ metadata.gz: d3e70d04e8248d787febc0fa2abbf1b2d61b29daca52eb43348beafda614acd0498bd93fd52a3b53f10d9010e1d2f180a7689ca0a36a4b2aada5478105140774
7
+ data.tar.gz: 1756af428ee66d0538fc8c428929408098add0f820506881fe295022069465ae624d96263dbaf6dff154c15711e1dd57a54363c927a3f2a240ff7e118f6f356b
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.7.3 (2019-11-21)
2
+
3
+ * Do not crash if job class is not found on the resque-web server
4
+
1
5
  # 1.7.2 (2019-11-21)
2
6
 
3
7
  * Address part 2 of issue #158
@@ -66,15 +66,23 @@ module ResqueRetry
66
66
  # cancels job retry
67
67
  def cancel_retry(job)
68
68
  klass = get_class(job)
69
- retry_key = retry_key_for_job(job)
70
- Resque.remove_delayed(klass, *job['args'])
71
- Resque.redis.del("failure-#{retry_key}")
72
- Resque.redis.del(retry_key)
69
+ if klass
70
+ retry_key = retry_key_for_job(job)
71
+ Resque.remove_delayed(klass, *job['args'])
72
+ Resque.redis.del("failure-#{retry_key}")
73
+ Resque.redis.del(retry_key)
74
+ else
75
+ raise 'cannot cancel, job not found'
76
+ end
73
77
  end
74
78
 
75
79
  private
76
80
  def get_class(job)
77
- Resque::Job.new(nil, nil).constantize(job['class'])
81
+ begin
82
+ Resque::Job.new(nil, nil).constantize(job['class'])
83
+ rescue
84
+ nil
85
+ end
78
86
  end
79
87
  end
80
88
 
@@ -1,3 +1,3 @@
1
1
  module ResqueRetry
2
- VERSION = '1.7.2'
2
+ VERSION = '1.7.3'
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.7.2
4
+ version: 1.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Antins