Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix monit config file name missing application #205

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/capistrano/tasks/monit.rake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace :load do
task :defaults do
set :sidekiq_monit_conf_dir, '/etc/monit/conf.d'
set :sidekiq_monit_conf_file, "#{sidekiq_service_name}.conf"
set :sidekiq_monit_conf_file, -> { "#{sidekiq_service_name}.conf" }
set :sidekiq_monit_use_sudo, true
set :monit_bin, '/usr/bin/monit'
set :sidekiq_monit_default_hooks, true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ check process <%= sidekiq_service_name(idx) %>
start program = "/bin/su - <%= sidekiq_user(@role) %> -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:sidekiq] %> <%= sidekiq_config %> --index <%= idx %> --pidfile <%= pid_file %> --environment <%= fetch(:sidekiq_env) %> <%= sidekiq_concurrency %> <%= sidekiq_logfile %> <%= sidekiq_require %> <%= sidekiq_queues %> <%= sidekiq_options_per_process[idx] %> -d'" with timeout 30 seconds

stop program = "/bin/su - <%= sidekiq_user(@role) %> -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:sidekiqctl] %> stop <%= pid_file %>'" with timeout <%= fetch(:sidekiq_timeout).to_i + 10 %> seconds
group <%= fetch(:sidekiq_monit_group, fetch(:application)) %>-sidekiq
group <%= fetch(:sidekiq_monit_group) || fetch(:application) %>-sidekiq

<% end %>