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