backgrounded 0.7.2 → 0.7.3
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.
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require 'resque'
|
|
2
|
+
|
|
3
|
+
# handler that acts like the in process handler but marshalls the arguments
|
|
4
|
+
# this simulates how resque encodes/decodes values to/from redis
|
|
5
|
+
# useful when passing symbols to arguments and they end up being processed as strings
|
|
6
|
+
module Backgrounded
|
|
7
|
+
module Handler
|
|
8
|
+
class PseudoResqueHandler
|
|
9
|
+
def request(object, method, *args)
|
|
10
|
+
object.send method, *Resque.decode(Resque.encode(args))
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
data/lib/backgrounded/version.rb
CHANGED
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: backgrounded
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.7.
|
|
5
|
+
version: 0.7.3
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Ryan Sonnek
|
|
@@ -121,6 +121,7 @@ files:
|
|
|
121
121
|
- lib/backgrounded/handler/delayed_job_handler.rb
|
|
122
122
|
- lib/backgrounded/handler/inprocess_handler.rb
|
|
123
123
|
- lib/backgrounded/handler/no_op_handler.rb
|
|
124
|
+
- lib/backgrounded/handler/pseudo_resque_handler.rb
|
|
124
125
|
- lib/backgrounded/handler/resque_handler.rb
|
|
125
126
|
- lib/backgrounded/handler/workling_handler.rb
|
|
126
127
|
- lib/backgrounded/version.rb
|