gru 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gru/adapters/redis_adapter.rb +4 -4
- data/lib/gru/version.rb +1 -1
- data/lib/gru/worker_manager.rb +0 -4
- data/spec/gru/adapters/redis_adapter_spec.rb +3 -3
- 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: 2463532c5b329bff6e349b807995137e818c81fc
|
4
|
+
data.tar.gz: fc876dd69604baec04fa25b00c68fffac7e1ba5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8d6f5c0cdc9f0095f975d6e7857eea8e8f3f354dd10baf87495add5f99adbd632e1f865a23e97d456352c88c48da538d7e083805883ba14b402965fe8420484
|
7
|
+
data.tar.gz: 72d9b7e2741b39db85ebdc48a249ebd609b16fa68d7619b0ed94284cdb8c71ab2a4a6ea270c037802da40b46ecb25d07bb4946c5e9fd29024d15ded8d4503292
|
@@ -79,19 +79,19 @@ module Gru
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def register_worker(worker,count)
|
82
|
-
send_message(:
|
82
|
+
send_message(:hset,"#{host_key}:workers_running",worker,count)
|
83
83
|
end
|
84
84
|
|
85
85
|
def register_global_worker(worker,count)
|
86
|
-
send_message(:
|
86
|
+
send_message(:hset,"#{global_key}:workers_running",worker,count)
|
87
87
|
end
|
88
88
|
|
89
89
|
def set_max_worker_count(worker,count)
|
90
|
-
send_message(:
|
90
|
+
send_message(:hset,"#{host_key}:max_workers",worker,count)
|
91
91
|
end
|
92
92
|
|
93
93
|
def set_max_global_worker_count(worker,count)
|
94
|
-
send_message(:
|
94
|
+
send_message(:hset,"#{global_key}:max_workers",worker,count)
|
95
95
|
end
|
96
96
|
|
97
97
|
def reserve_worker(worker)
|
data/lib/gru/version.rb
CHANGED
data/lib/gru/worker_manager.rb
CHANGED
@@ -28,17 +28,17 @@ describe Gru::Adapters::RedisAdapter do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it "registers workers" do
|
31
|
-
expect(client).to receive(:
|
31
|
+
expect(client).to receive(:hset).with("GRU:#{hostname}:workers_running",'test_worker',0)
|
32
32
|
adapter.send(:register_workers,workers)
|
33
33
|
end
|
34
34
|
|
35
35
|
it "sets worker counts" do
|
36
|
-
expect(client).to receive(:
|
36
|
+
expect(client).to receive(:hset).with("GRU:#{hostname}:max_workers",'test_worker',3)
|
37
37
|
adapter.send(:set_max_worker_counts,workers)
|
38
38
|
end
|
39
39
|
|
40
40
|
it "sets global worker counts" do
|
41
|
-
expect(client).to receive(:
|
41
|
+
expect(client).to receive(:hset).with("GRU:global:max_workers",'test_worker',3)
|
42
42
|
adapter.send(:set_max_global_worker_counts,workers)
|
43
43
|
end
|
44
44
|
|