Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sync_builds_worker.rb « jira_connect « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9cb5d5d247d8bc8ca644327449bf4daad03516d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module JiraConnect
  class SyncBuildsWorker
    include ApplicationWorker

    idempotent!
    worker_has_external_dependencies!

    queue_namespace :jira_connect
    feature_category :integrations

    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