diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/workers/pipeline_notification_worker.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/workers/pipeline_notification_worker.rb')
-rw-r--r-- | app/workers/pipeline_notification_worker.rb | 5 |
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 |