diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-24 00:07:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-24 00:07:12 +0300 |
commit | 08a284ca5e259f685b32ae255e42c7307891aed1 (patch) | |
tree | a4397c0ff5305ae63f562066f51806b41857b2a2 /lib/gitlab/sidekiq_daemon | |
parent | aee5750044c5bb3a92c4c783504fdb4a62c60fb2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/sidekiq_daemon')
-rw-r--r-- | lib/gitlab/sidekiq_daemon/memory_killer.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/gitlab/sidekiq_daemon/memory_killer.rb b/lib/gitlab/sidekiq_daemon/memory_killer.rb index 4bf9fd8470a..1682d62d782 100644 --- a/lib/gitlab/sidekiq_daemon/memory_killer.rb +++ b/lib/gitlab/sidekiq_daemon/memory_killer.rb @@ -241,9 +241,8 @@ module Gitlab deadline = Gitlab::Metrics::System.monotonic_time + time - # we try to finish as early as all jobs finished - # so we retest that in loop - sleep(CHECK_INTERVAL_SECONDS) while enabled? && any_jobs? && Gitlab::Metrics::System.monotonic_time < deadline + # Sleep until thread killed or timeout reached + sleep(CHECK_INTERVAL_SECONDS) while enabled? && Gitlab::Metrics::System.monotonic_time < deadline end def signal_pgroup(signal, explanation) @@ -289,10 +288,6 @@ module Gitlab def pid Process.pid end - - def any_jobs? - @sidekiq_daemon_monitor.jobs.any? - end end end end |