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

26 lines
667 B
Ruby
Raw Normal View History

2021-03-08 18:12:59 +05:30
# frozen_string_literal: true
module JiraConnect
2021-09-30 23:02:18 +05:30
class SyncFeatureFlagsWorker # rubocop:disable Scalability/IdempotentWorker
2021-03-08 18:12:59 +05:30
include ApplicationWorker
2021-06-08 01:23:25 +05:30
sidekiq_options retry: 3
2021-03-08 18:12:59 +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-03-08 18:12:59 +05:30
2021-09-30 23:02:18 +05:30
worker_has_external_dependencies!
2021-03-08 18:12:59 +05:30
def perform(feature_flag_id, sequence_id)
feature_flag = ::Operations::FeatureFlag.find_by_id(feature_flag_id)
return unless feature_flag
::JiraConnect::SyncService
.new(feature_flag.project)
.execute(feature_flags: [feature_flag], update_sequence_id: sequence_id)
end
end
end