Skip to content
Snippets Groups Projects
Commit 2e067480 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Rename for a more consistent pipeline worker name, feedback:

parent b4e75155
No related branches found
No related tags found
No related merge requests found
Loading
@@ -85,7 +85,7 @@ module Ci
Loading
@@ -85,7 +85,7 @@ module Ci
   
after_transition any => [:success, :failed] do |pipeline| after_transition any => [:success, :failed] do |pipeline|
pipeline.run_after_commit do pipeline.run_after_commit do
SendPipelineNotificationWorker.perform_async(pipeline.id) PipelineNotificationWorker.perform_async(pipeline.id)
end end
end end
end end
Loading
Loading
Loading
@@ -32,7 +32,7 @@ class PipelinesEmailService < Service
Loading
@@ -32,7 +32,7 @@ class PipelinesEmailService < Service
return unless all_recipients.any? return unless all_recipients.any?
   
pipeline_id = data[:object_attributes][:id] pipeline_id = data[:object_attributes][:id]
SendPipelineNotificationWorker.new.perform(pipeline_id, all_recipients) PipelineNotificationWorker.new.perform(pipeline_id, all_recipients)
end end
   
def can_test? def can_test?
Loading
Loading
class SendPipelineNotificationWorker class PipelineNotificationWorker
include Sidekiq::Worker include Sidekiq::Worker
   
def perform(pipeline_id, recipients = nil) def perform(pipeline_id, recipients = nil)
Loading
Loading
require 'spec_helper' require 'spec_helper'
   
describe SendPipelineNotificationWorker do describe PipelineNotificationWorker do
let(:pipeline) do let(:pipeline) do
create(:ci_pipeline, create(:ci_pipeline,
project: project, project: project,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment