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 +4 -4
- data/HISTORY.md +4 -0
- data/lib/resque-retry/server.rb +7 -2
- data/lib/resque-retry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e009bab760d817a59eb5969981a4449b84b3b8a
|
4
|
+
data.tar.gz: 293ad2734c8083e095456b278c7fcf3f5aa724ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8bb21258513a5f42cb19a228bb46e57d25b57022aefaabca41c81d6c63fc483d44028960b8ec09c2cae0ac8575b6e1041e078c2532b67757117ac419397a190
|
7
|
+
data.tar.gz: 4f6ab5ead5467abfa397977c3b5b32c8ce3879b02a60045ac490d6683123fbc1561d4f611753df71d2b1f4874fbae440efd42b8eff2a2b9c547d5b150787277c
|
data/HISTORY.md
CHANGED
data/lib/resque-retry/server.rb
CHANGED
@@ -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 =
|
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 =
|
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
|
data/lib/resque-retry/version.rb
CHANGED
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.
|
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-
|
13
|
+
date: 2014-10-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: resque
|