summaryrefslogtreecommitdiff
path: root/app/workers/concerns/reenqueuer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/concerns/reenqueuer.rb')
-rw-r--r--app/workers/concerns/reenqueuer.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/workers/concerns/reenqueuer.rb b/app/workers/concerns/reenqueuer.rb
index 5cc13e490d8..bf6f6546c03 100644
--- a/app/workers/concerns/reenqueuer.rb
+++ b/app/workers/concerns/reenqueuer.rb
@@ -60,8 +60,6 @@ module Reenqueuer
5.seconds
end
- # We intend to get rid of sleep:
- # https://gitlab.com/gitlab-org/gitlab/issues/121697
module ReenqueuerSleeper
# The block will run, and then sleep until the minimum duration. Returns the
# block's return value.
@@ -73,7 +71,7 @@ module Reenqueuer
# end
#
def ensure_minimum_duration(minimum_duration)
- start_time = Time.now
+ start_time = Time.current
result = yield
@@ -95,7 +93,7 @@ module Reenqueuer
end
def elapsed_time(start_time)
- Time.now - start_time
+ Time.current - start_time
end
end
end