onyx-resque-retry 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/resque-retry.rb +0 -13
- data/lib/resque/plugins/retry.rb +11 -0
- metadata +3 -3
data/lib/resque-retry.rb
CHANGED
@@ -4,16 +4,3 @@ require 'resque_scheduler'
|
|
4
4
|
require 'resque/plugins/retry'
|
5
5
|
require 'resque/plugins/exponential_backoff'
|
6
6
|
require 'resque/failure/multiple_with_retry_suppression'
|
7
|
-
|
8
|
-
class Object
|
9
|
-
def instance_exec(*args, &block)
|
10
|
-
mname = "__instance_exec_#{Thread.current.object_id.abs}"
|
11
|
-
class << self; self end.class_eval{ define_method(mname, &block) }
|
12
|
-
begin
|
13
|
-
ret = send(mname, *args)
|
14
|
-
ensure
|
15
|
-
class << self; self end.class_eval{ undef_method(mname) } rescue nil
|
16
|
-
end
|
17
|
-
ret
|
18
|
-
end
|
19
|
-
end
|
data/lib/resque/plugins/retry.rb
CHANGED
@@ -222,6 +222,17 @@ module Resque
|
|
222
222
|
end
|
223
223
|
end
|
224
224
|
|
225
|
+
def instance_exec(*args, &block)
|
226
|
+
mname = "__instance_exec_#{Thread.current.object_id.abs}"
|
227
|
+
class << self; self end.class_eval{ define_method(mname, &block) }
|
228
|
+
begin
|
229
|
+
ret = send(mname, *args)
|
230
|
+
ensure
|
231
|
+
class << self; self end.class_eval{ undef_method(mname) } rescue nil
|
232
|
+
end
|
233
|
+
ret
|
234
|
+
end
|
235
|
+
|
225
236
|
end
|
226
237
|
end
|
227
238
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onyx-resque-retry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luke Antins
|