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 +4 -4
- data/HISTORY.md +4 -0
- data/lib/resque-retry/server.rb +13 -5
- data/lib/resque-retry/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 215fb485738158bbc70e52dc3cfb8ffe0f506cea4eea5000c63bfd0112e1e1ad
|
4
|
+
data.tar.gz: d3de2dc53f2d491ef38327723c72fe0fe393caeb611887037128345f1a782a36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3e70d04e8248d787febc0fa2abbf1b2d61b29daca52eb43348beafda614acd0498bd93fd52a3b53f10d9010e1d2f180a7689ca0a36a4b2aada5478105140774
|
7
|
+
data.tar.gz: 1756af428ee66d0538fc8c428929408098add0f820506881fe295022069465ae624d96263dbaf6dff154c15711e1dd57a54363c927a3f2a240ff7e118f6f356b
|
data/HISTORY.md
CHANGED
data/lib/resque-retry/server.rb
CHANGED
@@ -66,15 +66,23 @@ module ResqueRetry
|
|
66
66
|
# cancels job retry
|
67
67
|
def cancel_retry(job)
|
68
68
|
klass = get_class(job)
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
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
|
-
|
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
|
|
data/lib/resque-retry/version.rb
CHANGED