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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
620 B
Ruby
Raw Normal View History

2021-02-22 17:27:13 +05:30
# frozen_string_literal: true
module JiraConnect
2021-09-30 23:02:18 +05:30
class SyncBuildsWorker # rubocop:disable Scalability/IdempotentWorker
2021-02-22 17:27:13 +05:30
include ApplicationWorker
2021-06-08 01:23:25 +05:30
sidekiq_options retry: 3
2021-02-22 17:27:13 +05:30
queue_namespace :jira_connect
feature_category :integrations
2021-09-30 23:02:18 +05:30
data_consistency :delayed
2021-10-27 15:23:28 +05:30
urgency :low
2021-02-22 17:27:13 +05:30
2021-09-30 23:02:18 +05:30
worker_has_external_dependencies!
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