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:
authorJames Lopez <james@jameslopez.es>2017-05-05 19:01:33 +0300
committerJames Lopez <james@jameslopez.es>2017-05-05 19:01:33 +0300
commit6ecf16b8f70335e1e6868b7c918cd031f5eb2f8d (patch)
treee57683de43fa63c278929bcba679d1077906a2fe /app/workers
parentce418036c763219df8239632f71ef0e9782be7ea (diff)
refactor code based on feedback
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/propagate_service_template_worker.rb (renamed from app/workers/propagate_project_service_worker.rb)6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/propagate_project_service_worker.rb b/app/workers/propagate_service_template_worker.rb
index 5eabe4eaecd..f1fc7ccb955 100644
--- a/app/workers/propagate_project_service_worker.rb
+++ b/app/workers/propagate_service_template_worker.rb
@@ -1,5 +1,5 @@
# Worker for updating any project specific caches.
-class PropagateProjectServiceWorker
+class PropagateServiceTemplateWorker
include Sidekiq::Worker
include DedicatedSidekiqQueue
@@ -10,14 +10,14 @@ class PropagateProjectServiceWorker
def perform(template_id)
return unless try_obtain_lease_for(template_id)
- Projects::PropagateService.propagate(Service.find_by(id: template_id))
+ Projects::PropagateServiceTemplate.propagate(Service.find_by(id: template_id))
end
private
def try_obtain_lease_for(template_id)
Gitlab::ExclusiveLease.
- new("propagate_project_service_worker:#{template_id}", timeout: LEASE_TIMEOUT).
+ new("propagate_service_template_worker:#{template_id}", timeout: LEASE_TIMEOUT).
try_obtain
end
end