Commit f1321c8a authored by Sean McGivern's avatar Sean McGivern

Merge branch 'adjust-sigkill-delay-in-sidekiq-cluster' into 'master'

Respect sidekiq timeout when hard-killing workers

See merge request gitlab-org/gitlab!38242
parents 714863dd d31730c3
......@@ -14,10 +14,10 @@ if ENV['ENABLE_SIDEKIQ_CLUSTER']
if Process.ppid != parent
Process.kill(:TERM, Process.pid)
# Wait for just a few extra seconds for a final attempt to
# gracefully terminate. Considering the parent (cluster) process
# have changed (SIGKILL'd), it shouldn't take long to shutdown.
sleep(5)
# Allow sidekiq to cleanly terminate and push any running jobs back
# into the queue. We use the configured timeout and add a small
# grace period
sleep(Sidekiq.options[:timeout] + 5)
# Signaling the Sidekiq Pgroup as KILL is not forwarded to
# a possible child process. In Sidekiq Cluster, all child Sidekiq
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment