capistrano-sidekiq 0.3.5 → 0.3.6

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: 91f1e11f4d1bc4cd2191a9656fcc4540dca65f76
4
- data.tar.gz: fda4951957c6c6d6c8ec10fb2ea7de28baed145a
3
+ metadata.gz: 9edb38405222576fce492b0c77a9c6ba2dee7bb6
4
+ data.tar.gz: 0ea1fe8a36a8566d03d26cc68be5dcb7406825cc
5
5
  SHA512:
6
- metadata.gz: 674d982c2517fe6f418f8b46a2af6a89318426acfef78e919da7c42409dd1ef8a4a543f9e198c9ae93a1cb4537fc9401fba3aededc6277da16e02c0ee78650a2
7
- data.tar.gz: dc373e85a7503d2074799c23fd42e382ae8d35aec3ca4c5c06100e5f4a77a31c85875060342a856310c96e30cf43b5d40cd4d51bb402419370b9cfe87ea73255
6
+ metadata.gz: b94ffa22a4abc9e36fc48a86d444d8ac5eb4d3d3d39df9180392ca67b6619eb3856a04a1761cea1a3f59b9afa76844f907620ab6bc69f071b902a45baa12561f
7
+ data.tar.gz: c260577d4f458bb56d2d7a9142cde377bc1bde20d744cd0b91a21a397d56f483ae15cc0eb492723c96d8bbfa596dc47ac3a446e307850fad7d168ffc54965e8b
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Sidekiq
3
- VERSION = '0.3.5'
3
+ VERSION = '0.3.6'
4
4
  end
5
5
  end
@@ -4,6 +4,7 @@ Capistrano::Configuration.instance.load do
4
4
 
5
5
  _cset(:sidekiq_pid) { File.join(shared_path, 'pids', 'sidekiq.pid') }
6
6
  _cset(:sidekiq_env) { fetch(:rack_env, fetch(:rails_env, 'production')) }
7
+ _cset(:sidekiq_tag) { nil }
7
8
  _cset(:sidekiq_log) { File.join(shared_path, 'log', 'sidekiq.log') }
8
9
 
9
10
  _cset(:sidekiq_options) { nil }
@@ -19,7 +19,7 @@ namespace :deploy do
19
19
  before :starting, :check_sidekiq_hooks do
20
20
  invoke 'sidekiq:add_default_hooks' if fetch(:sidekiq_default_hooks)
21
21
  end
22
- after :restart, :restart_sidekiq do
22
+ after :publishing, :restart_sidekiq do
23
23
  invoke 'sidekiq:restart' if fetch(:sidekiq_default_hooks)
24
24
  end
25
25
  end
@@ -47,11 +47,11 @@ namespace :sidekiq do
47
47
  end
48
48
 
49
49
  def pid_process_exists?(pid_file)
50
- pid_file_exists?(pid_file) and test("kill -0 $( cat #{pid_file} )")
50
+ pid_file_exists?(pid_file) and test(*("kill -0 $( cat #{pid_file} )").split(' '))
51
51
  end
52
52
 
53
53
  def pid_file_exists?(pid_file)
54
- test("[ -f #{pid_file} ]")
54
+ test(*("[ -f #{pid_file} ]").split(' '))
55
55
  end
56
56
 
57
57
  def stop_sidekiq(pid_file)
@@ -2,8 +2,8 @@
2
2
  <% processes_pids.each_with_index do |pid_file, idx| %>
3
3
  check process <%= sidekiq_service_name(idx) %>
4
4
  with pidfile "<%= pid_file %>"
5
- start program = "/usr/bin/sudo -u <%= @role.user %> /bin/bash -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sidekiq -P <%= pid_file %>'" with timeout 30 seconds
5
+ start program = "/usr/bin/sudo -u <%= @role.user %> /bin/bash -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sidekiq <% if fetch(:sidekiq_config) %> -C <%= fetch(:sidekiq_config) %> <% end %> -P <%= pid_file %>'" with timeout 30 seconds
6
6
  stop program = "/usr/bin/sudo -u <%= @role.user %> /bin/bash -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sidekiqctl stop <%= pid_file %>'" with timeout <%= fetch(:sidekiq_timeout).to_i + 10 %> seconds
7
7
  group <%= fetch(:sidekiq_monit_group, fetch(:application)) %>-sidekiq
8
8
 
9
- <% end %>
9
+ <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-25 00:00:00.000000000 Z
11
+ date: 2014-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano