redis-rpc 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/examples/server.rb +1 -1
- data/lib/redis-rpc.rb +6 -1
- data/lib/redis-rpc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d3ecb20c2a9175a75952447dd563e997930e368
|
4
|
+
data.tar.gz: c143b84721db85c020cea88dd5e5dac40c62bd57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3793b860b784c9b0477dbd76b421694c28a0ec213f956a6eb45d89a4dcfd61c99b668aa98c6ac116a2265e2010e614253f7abe8ad6bc04ea832f3fdb00048a5
|
7
|
+
data.tar.gz: 21ea793d240f13eb46fecc7a717309c7a14019decc4832887da460f4bde6f2f74a41cfb8e35940038cb2c8f39f8d9878430f3a65c1f3e6978d376c279d3f396a
|
data/Gemfile.lock
CHANGED
data/examples/server.rb
CHANGED
@@ -8,5 +8,5 @@ require File.expand_path('../calc', __FILE__)
|
|
8
8
|
redis_server = Redis.new
|
9
9
|
message_queue = 'calc'
|
10
10
|
local_object = Calculator.new
|
11
|
-
server = RedisRpc::Server.new redis_server, message_queue, local_object
|
11
|
+
server = RedisRpc::Server.new redis_server, message_queue, local_object, verbose: true
|
12
12
|
server.run
|
data/lib/redis-rpc.rb
CHANGED
@@ -81,11 +81,12 @@ module RedisRpc
|
|
81
81
|
end
|
82
82
|
|
83
83
|
class Server
|
84
|
-
def initialize( redis_server, message_queue, local_object, timeout=nil )
|
84
|
+
def initialize( redis_server, message_queue, local_object, timeout=nil, verbose: false)
|
85
85
|
@redis_server = redis_server
|
86
86
|
@message_queue = message_queue
|
87
87
|
@local_object = local_object
|
88
88
|
@timeout = timeout
|
89
|
+
@verbose = verbose
|
89
90
|
end
|
90
91
|
|
91
92
|
def run
|
@@ -119,6 +120,10 @@ module RedisRpc
|
|
119
120
|
rpc_response = {'exception' => err.to_s, 'backtrace' => err.backtrace}
|
120
121
|
end
|
121
122
|
|
123
|
+
if @verbose
|
124
|
+
p rpc_response
|
125
|
+
end
|
126
|
+
|
122
127
|
# response tansport
|
123
128
|
rpc_raw_response = MultiJson.dump rpc_response
|
124
129
|
@redis_server.multi do
|
data/lib/redis-rpc/version.rb
CHANGED