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/workers/container_registry/migration/enqueuer_worker.rb')
-rw-r--r--app/workers/container_registry/migration/enqueuer_worker.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/workers/container_registry/migration/enqueuer_worker.rb b/app/workers/container_registry/migration/enqueuer_worker.rb
index eb68b4d3b62..a8468c12b8d 100644
--- a/app/workers/container_registry/migration/enqueuer_worker.rb
+++ b/app/workers/container_registry/migration/enqueuer_worker.rb
@@ -30,6 +30,11 @@ module ContainerRegistry
re_enqueue_if_capacity if re_enqueue
end
+ def self.enqueue_a_job
+ perform_async
+ perform_in(7.seconds) if ::ContainerRegistry::Migration.enqueue_twice?
+ end
+
private
def with_a_lease_on_repository
@@ -164,7 +169,7 @@ module ContainerRegistry
def re_enqueue_if_capacity
return unless below_capacity?
- self.class.perform_async
+ self.class.enqueue_a_job
end
def log_repository(repository)