diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /lib/gitlab/sidekiq_queue.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'lib/gitlab/sidekiq_queue.rb')
-rw-r--r-- | lib/gitlab/sidekiq_queue.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/sidekiq_queue.rb b/lib/gitlab/sidekiq_queue.rb index 4b71dfc0c1b..eb3a8e3d497 100644 --- a/lib/gitlab/sidekiq_queue.rb +++ b/lib/gitlab/sidekiq_queue.rb @@ -14,7 +14,7 @@ module Gitlab end def drop_jobs!(search_metadata, timeout:) - start_time = Gitlab::Metrics::System.monotonic_time + start_time = monotonic_time completed = true deleted_jobs = 0 @@ -62,7 +62,11 @@ module Gitlab end def timeout_exceeded?(start_time, timeout) - (Gitlab::Metrics::System.monotonic_time - start_time) > timeout + (monotonic_time - start_time) > timeout + end + + def monotonic_time + Gitlab::Metrics::System.monotonic_time end end end |