sidekiq-pool 1.1.0 → 1.2.0

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: 1eae1143714aedde01e2e9b38713e1d017836950
4
- data.tar.gz: f4ffeca132df5655eb44cfd6fe8e7d67236312e4
3
+ metadata.gz: 007c8607d7612d084d2836d9eba49ce492bd318e
4
+ data.tar.gz: b38de4932f6f0e15212adad140d5121e736e8e2f
5
5
  SHA512:
6
- metadata.gz: fe81588f152fcf36f0b52888180c5b70dd2e4fbcdd258ccc01ac2cda72327af7d37e4a6533e5b052e6c274ef9b7cdc5ec9dcb4e941410b8ee2cdc0fef967ccd6
7
- data.tar.gz: da14ea02a6af1ff6c71e30eaf968edff21996e80fef4cd0aedd24ecc91524f88dd4c0e3474a4938f16d83d517075c0438642f6885b0a7bd8a359c61c892a3887
6
+ metadata.gz: df48c578b96944b650df65db2fca3cf5ddc9d4ac59868769658e8c7bf20f36803c975b8a4dfc47406858ce72676a9dc84da0ee85dbdd652f994920e5d7d4eef8
7
+ data.tar.gz: ae7248a39b67a5a6f4d6e09e4e209043b679f472ca00ff8cabe9aaff242f5c9dbae64c4b08c1e81ba5ce3b9e9a45538deb6369e332f71ab236ce792cc07ba27e
@@ -44,7 +44,8 @@ module Sidekiq
44
44
  def start_new_pool
45
45
  logger.info 'Starting new pool'
46
46
  @settings = parse_config_file(@pool_config)
47
- Dir.chdir(@settings[:working_directory]) if @settings[:working_directory]
47
+ working_directory = @working_directory || @settings[:working_directory]
48
+ Dir.chdir(working_directory) if working_directory
48
49
  @types = @settings[:workers]
49
50
  @types.each do |type|
50
51
  type[:amount].times do
@@ -111,6 +112,14 @@ module Sidekiq
111
112
  @pool_config = arg
112
113
  end
113
114
 
115
+ o.on '--working-directory PATH', "path to working directory" do |arg|
116
+ unless Dir.exist?(arg)
117
+ puts "Provided directory #{arg} does not exist"
118
+ die(1)
119
+ end
120
+ @working_directory = arg
121
+ end
122
+
114
123
  o.on '-V', '--version', "Print version and exit" do |arg|
115
124
  puts "Sidekiq #{Sidekiq::VERSION}"
116
125
  die(0)
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Pool
3
- VERSION = '1.1.0'
3
+ VERSION = '1.2.0'
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: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurynas Butkus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-06 00:00:00.000000000 Z
11
+ date: 2017-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq