Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-31 15:10:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-31 15:10:02 +0300
commit2f2c8f84bf1dd181f28f71505c6216f34d67532e (patch)
tree350d9edd3f9e9bc6c003851ec55b15c499fdedf4 /config
parent9c15dfa1ef3b13fd9c1596e0c6be971405f376ab (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/initializers/sidekiq_cluster.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/config/initializers/sidekiq_cluster.rb b/config/initializers/sidekiq_cluster.rb
index 4ff8dd9b936..2f9c1de47eb 100644
--- a/config/initializers/sidekiq_cluster.rb
+++ b/config/initializers/sidekiq_cluster.rb
@@ -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