capistrano-sidekiq 0.3.8 → 0.4.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: 5dd1c2e79b129bc931e93fda45f0a71e40d7915e
4
- data.tar.gz: 1681fdc2903aa89986f1c36d62b23ddfbfa0bb9b
3
+ metadata.gz: 7f252aeda1b342db98d4e78c48a596f62a08854b
4
+ data.tar.gz: c8b03baafafcee0e6dc3ee5299a15684f8752c7e
5
5
  SHA512:
6
- metadata.gz: c2b565dd956c2d410123847b1dfca4b87653ec18e64507518ed001008a739fa8060b38253d13f95239c068c6c867d2c21df75a132fe674eccd906fe3e8937cce
7
- data.tar.gz: f7f3311f90b68b9d996e5051d8f3a4d3921b49f2036099da1eeea071a3b74a8175c8686842168078a44ff02494666f36ae033f0baf89880efb757ab479f0d441
6
+ metadata.gz: ee796988057a1bb571c48366007131c778f70dbc20f0e2d64b7660e17144584d32a403f0a914aa4ead634d5b5d0f7fe3227d9aabb8decae26f229a723afc5f82
7
+ data.tar.gz: 94d89cd024d5fc60cdccd529bf8bc2195c4bf8bbf654204d2117e1147ded1e63d1a4111df9a504aca771161419e11965cb5dac7279277b3e84d214a27d194124
data/README.md CHANGED
@@ -49,11 +49,12 @@ Configurable options, shown here with defaults:
49
49
  :sidekiqctl_cmd => "#{fetch(:bundle_cmd, "bundle")} exec sidekiqctl" # Only for capistrano2.5
50
50
  ```
51
51
 
52
- There is a know bug that prevent sidekiq from starting when pty is true
52
+ There is a known bug that prevents sidekiq from starting when pty is true
53
53
  ```ruby
54
54
  set :pty, false
55
55
  ```
56
56
  ## Changelog
57
+ - 0.3.9: Restore daemon flag from Monit template
57
58
  - 0.3.8:
58
59
  * Update monit template: use su instead of sudo / permit all Sidekiq options @bensie
59
60
  * Unmonitor monit while deploy @Saicheg
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Sidekiq
3
- VERSION = '0.3.8'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -59,7 +59,7 @@ Capistrano::Configuration.instance.load do
59
59
  args.push '--daemon'
60
60
  end
61
61
 
62
- run "if [ -d #{current_path} ] && [ ! -f #{pid_file} ]; then cd #{current_path} ; #{fetch(:sidekiq_cmd)} #{args.compact.join(' ')} ; else echo 'Sidekiq is already running'; fi", pty: false
62
+ run "if [ -d #{current_path} ] && [ ! -f #{pid_file} ] || ! kill -0 `cat #{pid_file}` > /dev/null 2>&1; then cd #{current_path} ; #{fetch(:sidekiq_cmd)} #{args.compact.join(' ')} ; else echo 'Sidekiq is already running'; fi", pty: false
63
63
  end
64
64
 
65
65
  desc 'Quiet sidekiq (stop accepting new work)'
@@ -49,7 +49,7 @@ namespace :sidekiq do
49
49
  end
50
50
  end
51
51
 
52
- desc 'Disable Sidekiq monit-service'
52
+ desc 'Start Sidekiq monit-service'
53
53
  task :start do
54
54
  on roles(fetch(:sidekiq_role)) do
55
55
  fetch(:sidekiq_processes).times do |idx|
@@ -58,7 +58,7 @@ namespace :sidekiq do
58
58
  end
59
59
  end
60
60
 
61
- desc 'Disable Sidekiq monit-service'
61
+ desc 'Stop Sidekiq monit-service'
62
62
  task :stop do
63
63
  on roles(fetch(:sidekiq_role)) do
64
64
  fetch(:sidekiq_processes).times do |idx|
@@ -67,7 +67,7 @@ namespace :sidekiq do
67
67
  end
68
68
  end
69
69
 
70
- desc 'Disable Sidekiq monit-service'
70
+ desc 'Restart Sidekiq monit-service'
71
71
  task :restart do
72
72
  on roles(fetch(:sidekiq_role)) do
73
73
  fetch(:sidekiq_processes).times do |idx|
@@ -29,7 +29,7 @@ namespace :sidekiq do
29
29
  pids = processes_pids
30
30
  pids.reverse! if reverse
31
31
  pids.each_with_index do |pid_file, idx|
32
- within current_path do
32
+ within release_path do
33
33
  yield(pid_file, idx)
34
34
  end
35
35
  end
@@ -119,7 +119,7 @@ namespace :sidekiq do
119
119
  desc 'Quiet sidekiq (stop processing new tasks)'
120
120
  task :quiet do
121
121
  on roles fetch(:sidekiq_role) do
122
- if test("[ -d #{current_path} ]") # fixes #11
122
+ if test("[ -d #{release_path} ]") # fixes #11
123
123
  for_each_process(true) do |pid_file, idx|
124
124
  if pid_process_exists?(pid_file)
125
125
  quiet_sidekiq(pid_file)
@@ -132,7 +132,7 @@ namespace :sidekiq do
132
132
  desc 'Stop sidekiq'
133
133
  task :stop do
134
134
  on roles fetch(:sidekiq_role) do
135
- if test("[ -d #{current_path} ]")
135
+ if test("[ -d #{release_path} ]")
136
136
  for_each_process(true) do |pid_file, idx|
137
137
  if pid_process_exists?(pid_file)
138
138
  stop_sidekiq(pid_file)
@@ -2,7 +2,7 @@
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 = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sidekiq <%= sidekiq_config %> --index <%= idx %> --pidfile <%= pid_file %> --environment <%= fetch(:sidekiq_env) %> <%= sidekiq_concurrency %> <%= sidekiq_logfile %> <%= sidekiq_queues %>'" with timeout 30 seconds
5
+ start program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sidekiq <%= sidekiq_config %> --index <%= idx %> --pidfile <%= pid_file %> --environment <%= fetch(:sidekiq_env) %> <%= sidekiq_concurrency %> <%= sidekiq_logfile %> <%= sidekiq_queues %> -d'" with timeout 30 seconds
6
6
 
7
7
  stop program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sidekiqctl stop <%= pid_file %>'" with timeout <%= fetch(:sidekiq_timeout).to_i + 10 %> seconds
8
8
  group <%= fetch(:sidekiq_monit_group, fetch(:application)) %>-sidekiq
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.8
4
+ version: 0.4.0
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-09-22 00:00:00.000000000 Z
11
+ date: 2014-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.4.1
82
+ rubygems_version: 2.2.2
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Sidekiq integration for Capistrano