Skip to content

Commit

Permalink
Add default sidekiq_user value + documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wingrunr21 committed Sep 30, 2015
1 parent 418c78e commit d802641
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Configurable options, shown here with defaults:
:sidekiq_monit_use_sudo => true
:sidekiq_cmd => "#{fetch(:bundle_cmd, "bundle")} exec sidekiq" # Only for capistrano2.5
:sidekiqctl_cmd => "#{fetch(:bundle_cmd, "bundle")} exec sidekiqctl" # Only for capistrano2.5
:sidekiq_user => nil #user to run sidekiq as
```

There is a known bug that prevents sidekiq from starting when pty is true on Capistrano 3.
Expand Down
2 changes: 2 additions & 0 deletions lib/capistrano/tasks/capistrano2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
_cset(:sidekiq_processes) { 1 }
_cset(:sidekiq_options_per_process) { nil }

_cset(:sidekiq_user) { nil }

if fetch(:sidekiq_default_hooks)
before 'deploy:update_code', 'sidekiq:quiet'
after 'deploy:stop', 'sidekiq:stop'
Expand Down
1 change: 1 addition & 0 deletions lib/capistrano/tasks/sidekiq.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace :load do
set :sidekiq_role, -> { :app }
set :sidekiq_processes, -> { 1 }
set :sidekiq_options_per_process, -> { nil }
set :sidekiq_user, -> { nil }
# Rbenv and RVM integration
set :rbenv_map_bins, fetch(:rbenv_map_bins).to_a.concat(%w(sidekiq sidekiqctl))
set :rvm_map_bins, fetch(:rvm_map_bins).to_a.concat(%w(sidekiq sidekiqctl))
Expand Down

0 comments on commit d802641

Please sign in to comment.