summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2019-03-01 12:01:17 +0000
committerDouwe Maan <douwe@gitlab.com>2019-03-01 12:01:17 +0000
commit6b507626ed3499c1796706b507c30b8f46c706b7 (patch)
tree32b31b16e9189cf95d46e39b9a2adeb5e9786db8
parent728e80798b53e05d4d94c54151b688366be22538 (diff)
parentadddbf437dc9702e06cc6ec2fd8a8b1c38cccdeb (diff)
downloadgitlab-ce-6b507626ed3499c1796706b507c30b8f46c706b7.tar.gz
Merge branch '40396-fix-sig-stp' into 'master'
SIGSTP should be SIGTSTP Closes #40396 See merge request gitlab-org/gitlab-ce!25682
-rw-r--r--lib/gitlab/sidekiq_middleware/memory_killer.rb2
-rw-r--r--spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/sidekiq_middleware/memory_killer.rb b/lib/gitlab/sidekiq_middleware/memory_killer.rb
index ad4112ba555..47333d257eb 100644
--- a/lib/gitlab/sidekiq_middleware/memory_killer.rb
+++ b/lib/gitlab/sidekiq_middleware/memory_killer.rb
@@ -31,7 +31,7 @@ module Gitlab
# Wait `GRACE_TIME` to give the memory intensive job time to finish.
# Then, tell Sidekiq to stop fetching new jobs.
- wait_and_signal(GRACE_TIME, 'SIGSTP', 'stop fetching new jobs')
+ wait_and_signal(GRACE_TIME, 'SIGTSTP', 'stop fetching new jobs')
# Wait `SHUTDOWN_WAIT` to give already fetched jobs time to finish.
# Then, tell Sidekiq to gracefully shut down by giving jobs a few more
diff --git a/spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb b/spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb
index 8fdbbacd04d..5df56178df2 100644
--- a/spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb
+++ b/spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb
@@ -37,7 +37,7 @@ describe Gitlab::SidekiqMiddleware::MemoryKiller do
it 'sends the STP, TERM and KILL signals at expected times' do
expect(subject).to receive(:sleep).with(15 * 60).ordered
- expect(Process).to receive(:kill).with('SIGSTP', pid).ordered
+ expect(Process).to receive(:kill).with('SIGTSTP', pid).ordered
expect(subject).to receive(:sleep).with(30).ordered
expect(Process).to receive(:kill).with('SIGTERM', pid).ordered