2020-01-07 12:07:55 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 18:09:10 +00:00
|
|
|
class SelfMonitoringProjectCreateWorker # rubocop:disable Scalability/IdempotentWorker
|
2020-01-07 12:07:55 +00:00
|
|
|
include ApplicationWorker
|
2021-04-30 18:10:09 +00:00
|
|
|
|
2021-07-21 12:09:35 +00:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 18:10:09 +00:00
|
|
|
sidekiq_options retry: 3
|
2020-01-07 12:07:55 +00:00
|
|
|
include ExclusiveLeaseGuard
|
2020-01-10 18:07:43 +00:00
|
|
|
include SelfMonitoringProjectWorker
|
2020-01-07 12:07:55 +00:00
|
|
|
|
|
|
|
def perform
|
|
|
|
try_obtain_lease do
|
|
|
|
Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService.new.execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|