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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aaafbe9673dc1591126b49f9f896691011de317a
4
- data.tar.gz: 181e47be5873eb7ad5a13bcda5a43fb2560a9984
3
+ metadata.gz: 2463532c5b329bff6e349b807995137e818c81fc
4
+ data.tar.gz: fc876dd69604baec04fa25b00c68fffac7e1ba5e
5
5
  SHA512:
6
- metadata.gz: 1690313caa470b0573fb847928d2d0f04e312e0492ec0c9f3fc1da0fd0bd9ad4b1b49b9a1d8206c8c3418c72318f6589bd29a747516208da1a18a02a4ca43445
7
- data.tar.gz: 94f8aa06b2884463bb4a24bb36be8b9281ea25e518adc3958423126302473806f35cdc6dc43cca4d9f3b621da25e0b7bd2af0378c4bb63ecfcf7477b3ba49997
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(:hsetnx,"#{host_key}:workers_running",worker,count)
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(:hsetnx,"#{global_key}:workers_running",worker,count)
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(:hsetnx,"#{host_key}:max_workers",worker,count)
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(:hsetnx,"#{global_key}:max_workers",worker,count)
94
+ send_message(:hset,"#{global_key}:max_workers",worker,count)
95
95
  end
96
96
 
97
97
  def reserve_worker(worker)
@@ -1,3 +1,3 @@
1
1
  module Gru
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -46,9 +46,5 @@ module Gru
46
46
  @adapter.release_workers
47
47
  end
48
48
 
49
- def cleanup
50
- @adapter.cleanup
51
- end
52
-
53
49
  end
54
50
  end
@@ -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(:hsetnx).with("GRU:#{hostname}:workers_running",'test_worker',0)
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(:hsetnx).with("GRU:#{hostname}:max_workers",'test_worker',3)
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(:hsetnx).with("GRU:global:max_workers",'test_worker',3)
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Gillis