Rename for a more consistent pipeline worker name, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342/diffs#note_17039533
This commit is contained in:
parent
b4e751557a
commit
2e067480a9
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||||
|
|
|
@ -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?
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class SendPipelineNotificationWorker
|
class PipelineNotificationWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
def perform(pipeline_id, recipients = nil)
|
def perform(pipeline_id, recipients = nil)
|
|
@ -1,6 +1,6 @@
|
||||||
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…
Reference in a new issue