nexia_worker_roulette 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/worker_roulette.rb +1 -2
- data/lib/worker_roulette/version.rb +1 -1
- data/spec/integration/evented_worker_roulette_spec.rb +4 -3
- data/spec/integration/worker_roulette_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/evented_readlock_spec.rb +1 -1
- data/spec/unit/lua_spec.rb +1 -1
- data/worker_roulette.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b27103027e8104f2bdfc46d1eadc13b0ad18254c
|
4
|
+
data.tar.gz: 49d40d641d1ba90e0bc5cb0c645e87071f2e0e47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0febfc96cc5e64720cf08079d42abb92f6e8eede7ce32e9be0340c4407a4e25e044bdaa5c6bd7ab5ce7e4b2e8f38c11ca01f373c0ca106288d06d416b2e17c9
|
7
|
+
data.tar.gz: 2d958c6ede7035620241580a5ce3563ba8cdd30d483cb9bf45fef040fc72607ecb72510639341d5b54e4114f4aac106e8bb544332a9cc2f5772f20091d092202
|
data/lib/worker_roulette.rb
CHANGED
@@ -12,14 +12,15 @@ module WorkerRoulette
|
|
12
12
|
let(:foreman_work_order) { Hash["payload" => "foreman"] }
|
13
13
|
let(:work_orders_with_headers) { default_headers.merge({ "payload" => work_orders }) }
|
14
14
|
let(:jsonized_work_orders_with_headers) { [WorkerRoulette.dump(work_orders_with_headers)] }
|
15
|
-
|
15
|
+
|
16
|
+
let(:metric_tracker) {
|
16
17
|
{
|
17
18
|
metric_host: "localhost",
|
18
19
|
metric_host_port: 7777
|
19
20
|
}
|
20
21
|
}
|
21
|
-
let(:worker_roulette)
|
22
|
-
let(:redis)
|
22
|
+
let(:worker_roulette) { WorkerRoulette.start(evented: true, metric_tracker: metric_tracker, host: '127.0.0.1') }
|
23
|
+
let(:redis) { Redis.new(worker_roulette.redis_config) }
|
23
24
|
|
24
25
|
before do
|
25
26
|
allow(Time).to receive(:now).and_return(queued_at)
|
@@ -14,7 +14,7 @@ module WorkerRoulette
|
|
14
14
|
let(:foreman_work_order) { Hash['payload' => "foreman"] }
|
15
15
|
let(:work_orders_with_headers) { default_headers.merge({ 'payload' => work_orders }) }
|
16
16
|
let(:jsonized_work_orders_with_headers) { [WorkerRoulette.dump(work_orders_with_headers)] }
|
17
|
-
let(:worker_roulette) { WorkerRoulette.start(evented: false, metric_tracker: metric_tracker) }
|
17
|
+
let(:worker_roulette) { WorkerRoulette.start(evented: false, metric_tracker: metric_tracker, host: '127.0.0.1') }
|
18
18
|
let(:metric_tracker) { nil }
|
19
19
|
|
20
20
|
let(:redis) { Redis.new(worker_roulette.redis_config) }
|
data/spec/spec_helper.rb
CHANGED
@@ -10,7 +10,7 @@ module WorkerRoulette
|
|
10
10
|
let(:queued_at) { 1234567 }
|
11
11
|
let(:default_headers) { Hash["headers" => { "sender" => sender, "queued_at" => (queued_at.to_f * 1_000_000).to_i }] }
|
12
12
|
let(:work_orders_with_headers) { default_headers.merge({ "payload" => work_orders }) }
|
13
|
-
let(:worker_roulette) { WorkerRoulette.start(evented: true) }
|
13
|
+
let(:worker_roulette) { WorkerRoulette.start(evented: true, host: '127.0.0.1') }
|
14
14
|
let(:foreman1) { worker_roulette.foreman(sender) }
|
15
15
|
let(:foreman2) { worker_roulette.foreman("foreman2") }
|
16
16
|
let(:tradesman2 ) { worker_roulette.tradesman }
|
data/spec/unit/lua_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
module WorkerRoulette
|
3
3
|
describe Lua do
|
4
4
|
include EventedSpec::EMSpec
|
5
|
-
let(:worker_roulette) {WorkerRoulette.start(evented: true)}
|
5
|
+
let(:worker_roulette) {WorkerRoulette.start(evented: true, host: '127.0.0.1') }
|
6
6
|
let(:lua) { Lua.new(worker_roulette.tradesman_connection_pool) }
|
7
7
|
let(:redis) {Redis.new(worker_roulette.redis_config)}
|
8
8
|
|
data/worker_roulette.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'hiredis', '~> 0.5'
|
23
23
|
spec.add_dependency 'em-hiredis', '~> 0.3'
|
24
24
|
spec.add_dependency 'connection_pool', '~> 2.0'
|
25
|
-
spec.add_dependency 'eventmachine', '~> 1.0
|
25
|
+
spec.add_dependency 'eventmachine', '~> 1.0'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.3'
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Saieg
|
@@ -88,14 +88,14 @@ dependencies:
|
|
88
88
|
requirements:
|
89
89
|
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 1.0
|
91
|
+
version: '1.0'
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - "~>"
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 1.0
|
98
|
+
version: '1.0'
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: bundler
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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.5.1
|
259
|
+
rubygems_version: 2.4.5.1
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: Pub Sub Queue for Redis that ensures ordered processing
|