diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 2a0865abd4bb610c0843d733e1285eac9422717f..5604296cba5c579cab89a9c0efcd705902879ba3 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 e2cb1df81b5142d1fe24648764d75faad18549c9..745f9bd1b43f492f9d1c3fb999e901ba7dc73d84 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 similarity index 84% rename from app/workers/send_pipeline_notification_worker.rb rename to app/workers/pipeline_notification_worker.rb index d4837d815a5a8008772d0c5cf334f5299aaf642a..f4e9a4cf2453bdc3caaffd3fb270dcf2ec97d89d 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 similarity index 98% rename from spec/workers/send_pipeline_notification_worker_spec.rb rename to spec/workers/pipeline_notification_worker_spec.rb index 8d358992c7c58e074fade6f6887018536ddc603c..c641d7a7801655a79d14312cf79b7c02a4b0f821 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,