sidekiq-runner 0.0.4 → 0.0.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: a964d456a2836681b258bc3cc4052fbc26dce0dd
4
- data.tar.gz: e931c16b0328eff55bcd3a09cba5de69e73e6e55
3
+ metadata.gz: 2aa1f4476684b0f716b49b69ab7f9bafb1cae76d
4
+ data.tar.gz: c7a620e97fcef970a8e4d12a41cdc07999a149e2
5
5
  SHA512:
6
- metadata.gz: 38bbf8146a5b13e4ab5c22891c5ccf49a206e3f148273c8d813ae6e87d3f290096fb2df3c4af9877e7af2e25c7f8e2891bf34e3b077a3aad16b2295858428476
7
- data.tar.gz: b58ed792d28ce63e3ece4538a53a832b0cbef7ff9e2cc85c3f41ade78fdf3531df9e63f743e7e52301189f00c6254e9901c0f69141424a5de1c02616a7be53b4
6
+ metadata.gz: b50414396e78b69576b4f00a90bb6ec63f2b8a4c7167b4faa60b453f1d05b8fd2ef8a09d7e7924c37ddc28c44e31f78dbffcc4b8b820fa4bd58c3719768b7c0a
7
+ data.tar.gz: 3d267f736c3109b0fd77e22db03cd871e6e5d5262107cd1f045e2b22381497f628720d22599d37404f7c86eb9ab9dd04c9a83912622966025df78218d0541cf4
@@ -1,3 +1,3 @@
1
1
  module SidekiqRunner
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -18,9 +18,14 @@ module SidekiqRunner
18
18
  abort 'God is already running.' if god_alive?(god_config)
19
19
 
20
20
  run(:start, sidekiq_config) do
21
+ $0 = "SidekiqRunner/God (#{god_config.process_name})"
22
+
21
23
  puts 'Starting god.'
22
24
  God::CLI::Run.new(god_config.options)
23
25
  end
26
+
27
+ sleep 1
28
+ fail 'Failed to start God.' unless god_alive?(god_config)
24
29
  end
25
30
 
26
31
  def self.stop
@@ -30,12 +35,12 @@ module SidekiqRunner
30
35
  God::EventHandler.load
31
36
 
32
37
  if god_alive?(god_config)
38
+ puts "Terminating god process #{god_config.process_name}..."
39
+
33
40
  sidekiq_config.each_key do |name|
34
- puts "Stopping Sidekiq instance #{name}..."
35
41
  God::CLI::Command.new('stop', god_config.options, ['', name])
36
42
  end
37
43
 
38
- puts "Terminating god process #{god_config.process_name}..."
39
44
  God::CLI::Command.new('terminate', god_config.options, [])
40
45
  else
41
46
  abort 'God is not running, so no need to stop it.'
@@ -46,8 +51,6 @@ module SidekiqRunner
46
51
  private
47
52
 
48
53
  def self.god_alive?(god_config)
49
- puts 'Checking whether god is alive...'
50
-
51
54
  require 'drb'
52
55
  require 'god/socket'
53
56
  DRb.start_service('druby://127.0.0.1:0')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - FlavourSys Technology GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-29 00:00:00.000000000 Z
11
+ date: 2014-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake