sidekiq-pool 0.1.4 → 0.1.5

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: 1d4b9169e939905c1a912072469f50813745e13b
4
- data.tar.gz: 1052a3df342858d35875a317147c990776c80a08
3
+ metadata.gz: 9ea56cb8acd5070d19812f7ca119ff2f2de59284
4
+ data.tar.gz: 0b2ef538a18916401814758c9cff1c43ab79379a
5
5
  SHA512:
6
- metadata.gz: ab482f6e449c0f7e58f8c1cb03ebc990a47115e75c13ab7f327f00c350fe86216e0b18e5798610d91b6e713c2d10698feacd5ffae658e873f580cd71dc8ba426
7
- data.tar.gz: a18b21ceb6afd7642139eeb41f573f763d76ae3104ee28fc5c4c82ced774541fa559a3e3338e5ccb766d782ccede62dd663a35ce1090b218de5f72b1ba43b83d
6
+ metadata.gz: d64e29c2190cb2533e701db749d7a642d4b5e0abc8a1f1a27d9c8ebeb7fd11c093aa86e960f8daaaced81d6cc9ea4b57a444ecd42ae6dff4a299c18df483d2fa
7
+ data.tar.gz: 84aebc1ad10f36ac0cd58d4f2381fb8d5182fbf9e14d5b7e9f382c885c6c0335a216abd3f9f1d5b3bed5f43aab75d89f80b76b4968f0fdee98f41e496a05336b
@@ -18,13 +18,18 @@ module Sidekiq
18
18
 
19
19
  trap_signals
20
20
 
21
- @pool_size.times { fork_child }
21
+ @pool_size.times do
22
+ sleep @fork_wait || DEFAULT_FORK_WAIT
23
+ fork_child
24
+ end
22
25
 
23
26
  wait_for_signals
24
27
  end
25
28
 
26
29
  private
27
30
 
31
+ DEFAULT_FORK_WAIT = 1
32
+
28
33
  def parse_options(argv)
29
34
  opts = {}
30
35
 
@@ -66,6 +71,10 @@ module Sidekiq
66
71
  opts[:verbose] = arg
67
72
  end
68
73
 
74
+ o.on '-w', '--fork-wait NUM', "seconds to wait between child forks, default #{DEFAULT_FORK_WAIT}" do |arg|
75
+ @fork_wait = Integer(arg)
76
+ end
77
+
69
78
  o.on '-C', '--config PATH', "path to YAML config file" do |arg|
70
79
  opts[:config_file] = arg
71
80
  end
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Pool
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-pool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurynas Butkus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-05 00:00:00.000000000 Z
11
+ date: 2016-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq