nexia_worker_roulette 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 827f6622758baeb0edd361b8df5ca0cc43a732b2
|
4
|
+
data.tar.gz: 202c53449f1c81ff95b35215a1d058c39e36f1e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e0bdbf78d9ca0ee4ff59cb355c46062e7f16b00d2107020b26b2d13d0dc582bc47c71c4f5361c9dcc33877f502718b77e3f32d8b7abe4386613bdb369d98062
|
7
|
+
data.tar.gz: 12030621e8f476a899d03fa72aca6b4237bcc180761167b5f95763a12d52a02a47d0211dc054bebcf14d85b7e90490a70083a62cdd5c2fa1c23f09e3492469eb
|
@@ -133,7 +133,7 @@ module WorkerRoulette
|
|
133
133
|
sender_key = results[0]
|
134
134
|
work_orders = results[1]
|
135
135
|
@remaining_jobs = results[2]
|
136
|
-
@last_sender = sender_key
|
136
|
+
@last_sender = sender_key
|
137
137
|
|
138
138
|
QueueMetricTracker.track_all(results) if work_orders.any?
|
139
139
|
work = work_orders.map { |wo| preprocess(WorkerRoulette.load(wo), channel) }
|
@@ -183,7 +183,7 @@ module WorkerRoulette
|
|
183
183
|
if remaining_jobs > 0
|
184
184
|
wait_for_work_orders(&on_message_callback)
|
185
185
|
else
|
186
|
-
sleep
|
186
|
+
sleep 2
|
187
187
|
wait_for_work_orders(&on_message_callback)
|
188
188
|
end
|
189
189
|
end
|
data/lib/worker_roulette.rb
CHANGED
@@ -116,7 +116,7 @@ module WorkerRoulette
|
|
116
116
|
it "does not have a last sender if it found no messages" do
|
117
117
|
expect(tradesman.work_orders!.length).to eq(1)
|
118
118
|
expect(tradesman.work_orders!.length).to eq(0)
|
119
|
-
expect(tradesman.last_sender).to
|
119
|
+
expect(tradesman.last_sender).to be_empty
|
120
120
|
end
|
121
121
|
|
122
122
|
it "drains one set of work_orders from the sender's work queue" do
|
@@ -181,7 +181,7 @@ module WorkerRoulette
|
|
181
181
|
tradesman.wait_for_work_orders do |work|
|
182
182
|
expect(work.to_s).to match("some old fashion work")
|
183
183
|
expect(work.to_s).not_to match("evil")
|
184
|
-
expect(tradesman.last_sender).to eq('foreman')
|
184
|
+
expect(tradesman.last_sender).to eq('good_channel:foreman')
|
185
185
|
allow(tradesman).to receive(:wait_for_work_orders)
|
186
186
|
end
|
187
187
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexia_worker_roulette
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Saieg
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-07-
|
13
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: oj
|
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
258
|
rubyforge_project:
|
259
|
-
rubygems_version: 2.4.
|
259
|
+
rubygems_version: 2.4.3
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: Pub Sub Queue for Redis that ensures ordered processing
|
@@ -275,3 +275,4 @@ test_files:
|
|
275
275
|
- spec/unit/readlock_spec.rb
|
276
276
|
- spec/unit/stat_calculator_spec.rb
|
277
277
|
- spec/unit/worker_roulette_spec.rb
|
278
|
+
has_rdoc:
|