debian-mirror-gitlab/app/workers/jira_connect/sync_builds_worker.rb

27 lines
577 B
Ruby
Raw Normal View History

2021-02-22 17:27:13 +05:30
# frozen_string_literal: true
module JiraConnect
class SyncBuildsWorker
include ApplicationWorker
2021-06-08 01:23:25 +05:30
sidekiq_options retry: 3
2021-02-22 17:27:13 +05:30
idempotent!
worker_has_external_dependencies!
queue_namespace :jira_connect
feature_category :integrations
2021-06-08 01:23:25 +05:30
tags :exclude_from_kubernetes
2021-02-22 17:27:13 +05:30
def perform(pipeline_id, sequence_id)
pipeline = Ci::Pipeline.find_by_id(pipeline_id)
return unless pipeline
::JiraConnect::SyncService
.new(pipeline.project)
.execute(pipelines: [pipeline], update_sequence_id: sequence_id)
end
end
end