fairway 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTYxMDc5ZDNmZWM4YmViYmExMzZlZTEyYTJhMmQ5ZTZkYzA5MGM2OQ==
4
+ OTY4Y2NjNWRkYTM0NzYwY2U3NWRmNzhmMWE3ZmVhY2M3MTlhMjc0Mg==
5
5
  data.tar.gz: !binary |-
6
- ZjZhOTMyYTI0OTgzOTU3OTlmMTFhZDkyNzU4Y2U0NjVmOGQ4Yjc4NQ==
6
+ NzJjNmNjMTNmMGUxN2MyNjNlZWQ2MGE4MTY3OTg5NWMxZjU2NzZkYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmNlOTE3ODUzNmVmYWIwM2QwODUzN2NlMzM1NjAxMGQxMDk2ODY2NWE2Nzg5
10
- ZjUyNTcwNzI5NmQxNjgxNzI5MDhjMDVhZDUxNDE3ODFiODZhZGFmZmRkNzYw
11
- Njg0YjU3MjI5MDIxZTg4M2I4ZGE5ZGU5MmMwNWU0MGQyMmM4YzU=
9
+ ZWZmNmY3YmI5NDkyZGZmMDBhNWZkZDEyOGY3MWYxNmMzMWE3YTM3ZDRmNjdk
10
+ NGZmMzMwZjk3NDdmNGI5YTIzYjI2YzkyN2M0Nzc0YjA2Yzc4MDYxZTllZWE2
11
+ MWYwMDdhZmVmODE1ODcyZTRiNzViZDQ3ZWJiNDZlNGM2Y2M2ZTk=
12
12
  data.tar.gz: !binary |-
13
- NzhjMGQwMjg0YzIzYzcxMzJmODhkYTJkYmFkZmM0ZWM2NmQzN2ZmZmQxOWQw
14
- NGE2YTJhNjJiMjg0NGZiOWE4MjhiYTdjNmZjZDYxZTY0YzljOWY1M2NiNTc2
15
- NGM0ODQxNGJkNmM4YmVkYzFiMDNlNWM1ZmRjM2Y3NjM5ZDBkOTU=
13
+ Mzk4MDdhNGNhNWU1ZWM3OGVjZTZkZTI5YzMxNzE3YWY2NDM4YmExMzRiMjI4
14
+ M2U5YzBmZjFjYjVlNzE3MjhmZDlkZTQwYTBmMGU3MTM3OWViZjFlNjQzNGY4
15
+ MzMwOTM3ZjU0ODQ1YWFlZjZjNmJhYmU1MTdiMjQ3N2RjMTM5NjM=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fairway (0.3.3)
4
+ fairway (0.3.4)
5
5
  activesupport
6
6
  connection_pool
7
7
  redis
@@ -27,8 +27,8 @@ for i = 1, #registered_queues, 2 do
27
27
  local active_facets = k(queue, 'active_facets');
28
28
  local round_robin = k(queue, 'facet_queue');
29
29
  local facet_pool = k(queue, 'facet_pool');
30
- -- local inflight_facet = k(queue, facet .. ':inflight');
31
- -- local inflight_limit = k(queue, 'limit');
30
+ local inflight_facet = k(queue, facet .. ':inflight');
31
+ local inflight_limit = k(queue, 'limit');
32
32
 
33
33
  -- Delivering the message to a queue is as simple as
34
34
  -- pushing it onto the facet's message list, and
@@ -39,18 +39,18 @@ for i = 1, #registered_queues, 2 do
39
39
  -- Manage facet queue and active facets
40
40
  local current = tonumber(redis.call('hget', facet_pool, facet)) or 0;
41
41
  local priority = tonumber(redis.call('hget', priorities, facet)) or 1;
42
- -- local inflight_cur = tonumber(redis.call('scard', inflight_facet)) or 0;
43
- -- local inflight_max = tonumber(redis.call('get', inflight_limit)) or 0;
42
+ local inflight_cur = tonumber(redis.call('scard', inflight_facet)) or 0;
43
+ local inflight_max = tonumber(redis.call('get', inflight_limit)) or 0;
44
44
 
45
45
  local n = 0
46
46
 
47
47
  -- redis.log(redis.LOG_WARNING, current.."/"..length.."/"..priority.."/"..inflight_max.."/"..inflight_cur);
48
48
 
49
- -- if inflight_max > 0 then
50
- -- n = math.min(length, priority, inflight_max - inflight_cur);
51
- -- else
49
+ if inflight_max > 0 then
50
+ n = math.min(length, priority, inflight_max - inflight_cur);
51
+ else
52
52
  n = math.min(length, priority);
53
- -- end
53
+ end
54
54
 
55
55
  -- redis.log(redis.LOG_WARNING, "PUSH: "..current.."/"..n);
56
56
 
@@ -1,3 +1,3 @@
1
1
  module Fairway
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -23,8 +23,8 @@ for i = 1, #registered_queues, 2 do
23
23
  local active_facets = k(queue, 'active_facets');
24
24
  local round_robin = k(queue, 'facet_queue');
25
25
  local facet_pool = k(queue, 'facet_pool');
26
- -- local inflight_facet = k(queue, facet .. ':inflight');
27
- -- local inflight_limit = k(queue, 'limit');
26
+ local inflight_facet = k(queue, facet .. ':inflight');
27
+ local inflight_limit = k(queue, 'limit');
28
28
 
29
29
  -- Delivering the message to a queue is as simple as
30
30
  -- pushing it onto the facet's message list, and
@@ -35,18 +35,18 @@ for i = 1, #registered_queues, 2 do
35
35
  -- Manage facet queue and active facets
36
36
  local current = tonumber(redis.call('hget', facet_pool, facet)) or 0;
37
37
  local priority = tonumber(redis.call('hget', priorities, facet)) or 1;
38
- -- local inflight_cur = tonumber(redis.call('scard', inflight_facet)) or 0;
39
- -- local inflight_max = tonumber(redis.call('get', inflight_limit)) or 0;
38
+ local inflight_cur = tonumber(redis.call('scard', inflight_facet)) or 0;
39
+ local inflight_max = tonumber(redis.call('get', inflight_limit)) or 0;
40
40
 
41
41
  local n = 0
42
42
 
43
43
  -- redis.log(redis.LOG_WARNING, current.."/"..length.."/"..priority.."/"..inflight_max.."/"..inflight_cur);
44
44
 
45
- -- if inflight_max > 0 then
46
- -- n = math.min(length, priority, inflight_max - inflight_cur);
47
- -- else
45
+ if inflight_max > 0 then
46
+ n = math.min(length, priority, inflight_max - inflight_cur);
47
+ else
48
48
  n = math.min(length, priority);
49
- -- end
49
+ end
50
50
 
51
51
  -- redis.log(redis.LOG_WARNING, "PUSH: "..current.."/"..n);
52
52
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fairway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Allison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-26 00:00:00.000000000 Z
11
+ date: 2016-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport