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
|
|
|
|
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
|