Browse Source

allow sidekiq to shutdown gracefully

pull/1674/head
Phil Lee 3 years ago
parent
commit
b432090386
  1. 2
      config/cloud_foundry/review_manifest.yml
  2. 4
      config/initializers/sidekiq.rb
  3. 4
      manifest.yml

2
config/cloud_foundry/review_manifest.yml

@ -8,7 +8,7 @@ defaults: &defaults
instances: 1
memory: 1G
- type: worker
command: bundle exec sidekiq
command: bundle exec sidekiq -t 3
health-check-type: process
instances: 1
health-check-type: http

4
config/initializers/sidekiq.rb

@ -32,4 +32,8 @@ Sidekiq.configure_server do |config|
config.on(:startup) do
Sidekiq::Cron::Job.load_from_hash YAML.load_file("config/sidekiq_cron_schedule.yml")
end
config.on(:shutdown) do
Sidekiq::CLI.instance.launcher.quiet
end
end

4
manifest.yml

@ -8,7 +8,7 @@ defaults: &defaults
instances: 2
memory: 1G
- type: worker
command: bundle exec sidekiq
command: bundle exec sidekiq -t 3
health-check-type: process
instances: 2
health-check-type: http
@ -31,7 +31,7 @@ applications:
instances: 4
memory: 1G
- type: worker
command: bundle exec sidekiq
command: bundle exec sidekiq -3
health-check-type: process
instances: 2
env:

Loading…
Cancel
Save