diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-17 18:12:07 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-17 18:12:07 +0800 |
commit | 2e067480a9824228542c229a09aa4b6f006dc6f3 (patch) | |
tree | b3f34d83e897bcfd3433ca8b44a68ac26a128833 | |
parent | b4e751557ad35d7c5fbed55328892c43a4c84ba5 (diff) | |
download | gitlab-ce-2e067480a9824228542c229a09aa4b6f006dc6f3.tar.gz |
Rename for a more consistent pipeline worker name, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342/diffs#note_17039533
-rw-r--r-- | app/models/ci/pipeline.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/pipelines_email_service.rb | 2 | ||||
-rw-r--r-- | app/workers/pipeline_notification_worker.rb (renamed from app/workers/send_pipeline_notification_worker.rb) | 2 | ||||
-rw-r--r-- | spec/workers/pipeline_notification_worker_spec.rb (renamed from spec/workers/send_pipeline_notification_worker_spec.rb) | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 2a0865abd4b..5604296cba5 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -85,7 +85,7 @@ module Ci after_transition any => [:success, :failed] do |pipeline| pipeline.run_after_commit do - SendPipelineNotificationWorker.perform_async(pipeline.id) + PipelineNotificationWorker.perform_async(pipeline.id) end end end diff --git a/app/models/project_services/pipelines_email_service.rb b/app/models/project_services/pipelines_email_service.rb index e2cb1df81b5..745f9bd1b43 100644 --- a/app/models/project_services/pipelines_email_service.rb +++ b/app/models/project_services/pipelines_email_service.rb @@ -32,7 +32,7 @@ class PipelinesEmailService < Service return unless all_recipients.any? pipeline_id = data[:object_attributes][:id] - SendPipelineNotificationWorker.new.perform(pipeline_id, all_recipients) + PipelineNotificationWorker.new.perform(pipeline_id, all_recipients) end def can_test? diff --git a/app/workers/send_pipeline_notification_worker.rb b/app/workers/pipeline_notification_worker.rb index d4837d815a5..f4e9a4cf245 100644 --- a/app/workers/send_pipeline_notification_worker.rb +++ b/app/workers/pipeline_notification_worker.rb @@ -1,4 +1,4 @@ -class SendPipelineNotificationWorker +class PipelineNotificationWorker include Sidekiq::Worker def perform(pipeline_id, recipients = nil) diff --git a/spec/workers/send_pipeline_notification_worker_spec.rb b/spec/workers/pipeline_notification_worker_spec.rb index 8d358992c7c..c641d7a7801 100644 --- a/spec/workers/send_pipeline_notification_worker_spec.rb +++ b/spec/workers/pipeline_notification_worker_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe SendPipelineNotificationWorker do +describe PipelineNotificationWorker do let(:pipeline) do create(:ci_pipeline, project: project, |