Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/clusters/applications/schedule_update_service.rb')
-rw-r--r--app/services/clusters/applications/schedule_update_service.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/clusters/applications/schedule_update_service.rb b/app/services/clusters/applications/schedule_update_service.rb
index b7639c771a8..41718df9a98 100644
--- a/app/services/clusters/applications/schedule_update_service.rb
+++ b/app/services/clusters/applications/schedule_update_service.rb
@@ -16,9 +16,9 @@ module Clusters
return unless application
if recently_scheduled?
- worker_class.perform_in(BACKOFF_DELAY, application.name, application.id, project.id, Time.now)
+ worker_class.perform_in(BACKOFF_DELAY, application.name, application.id, project.id, Time.current)
else
- worker_class.perform_async(application.name, application.id, project.id, Time.now)
+ worker_class.perform_async(application.name, application.id, project.id, Time.current)
end
end
@@ -31,7 +31,7 @@ module Clusters
def recently_scheduled?
return false unless application.last_update_started_at
- application.last_update_started_at.utc >= Time.now.utc - BACKOFF_DELAY
+ application.last_update_started_at.utc >= Time.current.utc - BACKOFF_DELAY
end
end
end