2021-07-13 11:08:38 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Database
|
|
|
|
class PartitionManagementWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
|
|
|
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
|
|
|
|
|
2021-07-21 08:09:35 -04:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-07-13 11:08:38 -04:00
|
|
|
feature_category :database
|
|
|
|
idempotent!
|
|
|
|
|
|
|
|
def perform
|
2021-09-16 14:11:32 -04:00
|
|
|
Gitlab::Database::Partitioning.sync_partitions
|
2021-07-13 11:08:38 -04:00
|
|
|
ensure
|
2021-10-20 20:12:27 -04:00
|
|
|
Gitlab::Database::Partitioning.report_metrics
|
2021-07-13 11:08:38 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|