SIGSTP should be SIGTSTP
This commit is contained in:
parent
b98fd8a5a0
commit
adddbf437d
2 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ module Gitlab
|
||||||
|
|
||||||
# Wait `GRACE_TIME` to give the memory intensive job time to finish.
|
# Wait `GRACE_TIME` to give the memory intensive job time to finish.
|
||||||
# Then, tell Sidekiq to stop fetching new jobs.
|
# 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.
|
# Wait `SHUTDOWN_WAIT` to give already fetched jobs time to finish.
|
||||||
# Then, tell Sidekiq to gracefully shut down by giving jobs a few more
|
# Then, tell Sidekiq to gracefully shut down by giving jobs a few more
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe Gitlab::SidekiqMiddleware::MemoryKiller do
|
||||||
|
|
||||||
it 'sends the STP, TERM and KILL signals at expected times' do
|
it 'sends the STP, TERM and KILL signals at expected times' do
|
||||||
expect(subject).to receive(:sleep).with(15 * 60).ordered
|
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(subject).to receive(:sleep).with(30).ordered
|
||||||
expect(Process).to receive(:kill).with('SIGTERM', pid).ordered
|
expect(Process).to receive(:kill).with('SIGTERM', pid).ordered
|
||||||
|
|
Loading…
Reference in a new issue