redpack 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/rblib/redpack/transport.rb +1 -7
- metadata +4 -20
data/rblib/redpack/transport.rb
CHANGED
@@ -53,7 +53,6 @@ class RedisClientTransport
|
|
53
53
|
# assign a unique client key for this instance which will be used for return values
|
54
54
|
@identifier = @redis.incr("redpack_response_queue_index")
|
55
55
|
@return_queue_name = "redpack_response_queue:#{@identifier}"
|
56
|
-
@unprocessed_requests_name = "#{@return_queue_name}:unprocessed"
|
57
56
|
@pool = 0
|
58
57
|
end
|
59
58
|
|
@@ -97,9 +96,6 @@ class RedisClientTransport
|
|
97
96
|
def redis_push(msgpack_data, msgid = nil)
|
98
97
|
if msgid
|
99
98
|
@redis.multi
|
100
|
-
# puts "setting key in #{@unprocessed_requests_name}"
|
101
|
-
@redis.hset(@unprocessed_requests_name, msgid.to_s, msgpack_data)
|
102
|
-
# puts "pushing item into #{@queue_name}"
|
103
99
|
@redis.rpush(@queue_name, msgpack_data)
|
104
100
|
@redis.exec
|
105
101
|
else
|
@@ -155,7 +151,6 @@ class RedisServerTransport
|
|
155
151
|
redis_packet = BSON.deserialize(data[1])
|
156
152
|
if redis_packet["data"]
|
157
153
|
@return_queue_name = redis_packet["return"]
|
158
|
-
@unprocessed_requests_name = "#{@return_queue_name}:unprocessed"
|
159
154
|
msg = redis_packet["data"]
|
160
155
|
case msg[0]
|
161
156
|
when REQUEST
|
@@ -178,8 +173,7 @@ class RedisServerTransport
|
|
178
173
|
end
|
179
174
|
|
180
175
|
def finish(msgid)
|
181
|
-
#
|
182
|
-
@redis.hdel(@unprocessed_requests_name, msgid.to_s)
|
176
|
+
# potentially do work on finish
|
183
177
|
end
|
184
178
|
|
185
179
|
def send_data(data)
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 0
|
8
|
-
- 4
|
9
|
-
version: 1.0.4
|
4
|
+
prerelease:
|
5
|
+
version: 1.0.5
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Dean Mao
|
@@ -14,7 +10,7 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date: 2011-
|
13
|
+
date: 2011-04-19 00:00:00 -07:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
@@ -25,10 +21,6 @@ dependencies:
|
|
25
21
|
requirements:
|
26
22
|
- - ">="
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 1
|
30
|
-
- 1
|
31
|
-
- 4
|
32
24
|
version: 1.1.4
|
33
25
|
type: :runtime
|
34
26
|
version_requirements: *id001
|
@@ -40,10 +32,6 @@ dependencies:
|
|
40
32
|
requirements:
|
41
33
|
- - ">="
|
42
34
|
- !ruby/object:Gem::Version
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
- 3
|
46
|
-
- 0
|
47
35
|
version: 0.3.0
|
48
36
|
type: :runtime
|
49
37
|
version_requirements: *id002
|
@@ -85,21 +73,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
73
|
requirements:
|
86
74
|
- - ">="
|
87
75
|
- !ruby/object:Gem::Version
|
88
|
-
segments:
|
89
|
-
- 0
|
90
76
|
version: "0"
|
91
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
78
|
none: false
|
93
79
|
requirements:
|
94
80
|
- - ">="
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
segments:
|
97
|
-
- 0
|
98
82
|
version: "0"
|
99
83
|
requirements: []
|
100
84
|
|
101
85
|
rubyforge_project: redpack
|
102
|
-
rubygems_version: 1.
|
86
|
+
rubygems_version: 1.6.2
|
103
87
|
signing_key:
|
104
88
|
specification_version: 3
|
105
89
|
summary: RedPack, asynchronous redis RPC library derived from MsgPack-RPC using BSON serialization
|