gitlab-org--gitlab-foss/app/workers/self_monitoring_project_cre...

18 lines
411 B
Ruby

# frozen_string_literal: true
class SelfMonitoringProjectCreateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
data_consistency :always
sidekiq_options retry: 3
include ExclusiveLeaseGuard
include SelfMonitoringProjectWorker
def perform
try_obtain_lease do
Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService.new.execute
end
end
end