2021-09-30 23:02:18 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Database
|
|
|
|
class PartitionManagementWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
|
|
|
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
data_consistency :always
|
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
feature_category :database
|
|
|
|
idempotent!
|
|
|
|
|
|
|
|
def perform
|
2021-11-11 11:23:49 +05:30
|
|
|
Gitlab::Database::Partitioning.sync_partitions
|
2021-09-30 23:02:18 +05:30
|
|
|
ensure
|
2021-12-11 22:18:48 +05:30
|
|
|
Gitlab::Database::Partitioning.report_metrics
|
2021-09-30 23:02:18 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|