iron_mq 3.0.0 → 3.0.1
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/Gemfile.lock +1 -1
- data/lib/iron_mq/queues.rb +9 -8
- data/lib/iron_mq/version.rb +1 -1
- data/test/test_beanstalkd.rb +2 -2
- metadata +2 -4
- data/test/test_tmp.rb +0 -17
data/Gemfile.lock
CHANGED
data/lib/iron_mq/queues.rb
CHANGED
@@ -56,8 +56,8 @@ module IronMQ
|
|
56
56
|
def get(options={})
|
57
57
|
options[:name] ||= @client.queue_name
|
58
58
|
r = @client.get("#{path(options)}")
|
59
|
-
puts "HEADERS"
|
60
|
-
p r.headers
|
59
|
+
#puts "HEADERS"
|
60
|
+
#p r.headers
|
61
61
|
res = @client.parse_response(r)
|
62
62
|
return Queue.new(@client, res)
|
63
63
|
end
|
@@ -66,10 +66,11 @@ module IronMQ
|
|
66
66
|
# options:
|
67
67
|
# :name => if not specified, will use global queue name
|
68
68
|
# :subscribers => url's to subscribe to
|
69
|
+
# :push_type => multicast (default) or unicast.
|
69
70
|
def post(options={})
|
70
71
|
options[:name] ||= @client.queue_name
|
71
72
|
res = @client.parse_response(@client.post(path(options), options))
|
72
|
-
p res
|
73
|
+
#p res
|
73
74
|
res
|
74
75
|
end
|
75
76
|
|
@@ -127,7 +128,9 @@ module IronMQ
|
|
127
128
|
@client.queues.delete(:name => name)
|
128
129
|
end
|
129
130
|
|
130
|
-
#
|
131
|
+
# Updates the queue object
|
132
|
+
# :subscribers => url's to subscribe to
|
133
|
+
# :push_type => multicast (default) or unicast.
|
131
134
|
def update_queue(options)
|
132
135
|
@client.queues.post(options.merge(:name => name))
|
133
136
|
end
|
@@ -148,18 +151,16 @@ module IronMQ
|
|
148
151
|
end
|
149
152
|
|
150
153
|
def add_subscriber(subscriber_hash, options={})
|
151
|
-
puts 'add_subscriber'
|
152
154
|
res = @client.post("#{@client.queues.path(name: name)}/subscribers", subscribers: [subscriber_hash])
|
153
155
|
res = @client.parse_response(res)
|
154
|
-
p res
|
156
|
+
#p res
|
155
157
|
res
|
156
158
|
end
|
157
159
|
|
158
160
|
def remove_subscriber(subscriber_hash)
|
159
|
-
puts 'remove_subscriber'
|
160
161
|
res = @client.delete("#{@client.queues.path(name: name)}/subscribers", {subscribers: [subscriber_hash]}, {"Content-Type"=>@client.content_type})
|
161
162
|
res = @client.parse_response(res)
|
162
|
-
p res
|
163
|
+
#p res
|
163
164
|
res
|
164
165
|
end
|
165
166
|
|
data/lib/iron_mq/version.rb
CHANGED
data/test/test_beanstalkd.rb
CHANGED
@@ -111,7 +111,7 @@ class BeanstalkTests < TestBase
|
|
111
111
|
puts 'test_timeout'
|
112
112
|
msg = "timeout message #{Time.now}"
|
113
113
|
# timeout of 10 seconds
|
114
|
-
res = @beanstalk.put(msg, 65536, 0,
|
114
|
+
res = @beanstalk.put(msg, 65536, 0, 30)
|
115
115
|
puts 'result: ' + res.inspect
|
116
116
|
job = reserve(0)
|
117
117
|
puts 'first timeout job: ' + job.inspect
|
@@ -121,7 +121,7 @@ class BeanstalkTests < TestBase
|
|
121
121
|
assert niljob.nil?, "job is not nil! #{niljob.inspect}"
|
122
122
|
|
123
123
|
# let it time out
|
124
|
-
sleep
|
124
|
+
sleep 30
|
125
125
|
job = reserve(0)
|
126
126
|
puts 'second delayed job: ' + job.inspect
|
127
127
|
assert_not_nil job, "job is nil"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron_mq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: iron_core
|
@@ -184,7 +184,6 @@ files:
|
|
184
184
|
- test/test_bulk.rb
|
185
185
|
- test/test_iron_mq.rb
|
186
186
|
- test/test_push_queues.rb
|
187
|
-
- test/test_tmp.rb
|
188
187
|
homepage: https://github.com/iron-io/iron_mq_ruby
|
189
188
|
licenses: []
|
190
189
|
post_install_message:
|
@@ -219,4 +218,3 @@ test_files:
|
|
219
218
|
- test/test_bulk.rb
|
220
219
|
- test/test_iron_mq.rb
|
221
220
|
- test/test_push_queues.rb
|
222
|
-
- test/test_tmp.rb
|
data/test/test_tmp.rb
DELETED