2020-11-24 15:15:51 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-12-11 22:18:48 +05:30
|
|
|
response = Sidekiq::Worker.skipping_transaction_check do
|
2022-10-11 01:57:18 +05:30
|
|
|
result = ::Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService.new.execute
|
2023-01-13 00:05:48 +05:30
|
|
|
|
|
|
|
next result unless result[:status] == :success
|
|
|
|
|
2022-10-11 01:57:18 +05:30
|
|
|
AuthorizedProjectUpdate::ProjectRecalculateService.new(result[:project]).execute
|
|
|
|
|
|
|
|
result
|
2021-12-11 22:18:48 +05:30
|
|
|
end
|
2020-11-24 15:15:51 +05:30
|
|
|
|
|
|
|
if response[:status] == :success
|
2023-01-13 00:05:48 +05:30
|
|
|
puts "Successfully created self-monitoring project."
|
2020-11-24 15:15:51 +05:30
|
|
|
else
|
2023-01-13 00:05:48 +05:30
|
|
|
puts "Could not create self-monitoring project due to error: '#{response[:message]}'"
|
2020-11-24 15:15:51 +05:30
|
|
|
puts "Check logs for more details."
|
|
|
|
end
|