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:
Diffstat (limited to 'app/workers/pipeline_notification_worker.rb')
-rw-r--r--app/workers/pipeline_notification_worker.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/workers/pipeline_notification_worker.rb b/app/workers/pipeline_notification_worker.rb
index 3336383adf7..f4b43106bf2 100644
--- a/app/workers/pipeline_notification_worker.rb
+++ b/app/workers/pipeline_notification_worker.rb
@@ -7,10 +7,10 @@ class PipelineNotificationWorker # rubocop:disable Scalability/IdempotentWorker
urgency :high
worker_resource_boundary :cpu
- # rubocop: disable CodeReuse/ActiveRecord
def perform(pipeline_id, args = {})
case args
when Hash
+ args = args.with_indifferent_access
ref_status = args[:ref_status]
recipients = args[:recipients]
else # TODO: backward compatible interface, can be removed in 12.10
@@ -18,10 +18,9 @@ class PipelineNotificationWorker # rubocop:disable Scalability/IdempotentWorker
ref_status = nil
end
- pipeline = Ci::Pipeline.find_by(id: pipeline_id)
+ pipeline = Ci::Pipeline.find_by_id(pipeline_id)
return unless pipeline
NotificationService.new.pipeline_finished(pipeline, ref_status: ref_status, recipients: recipients)
end
- # rubocop: enable CodeReuse/ActiveRecord
end