debian-mirror-gitlab/app/workers/database/partition_management_worker.rb
2021-10-27 15:23:28 +05:30

20 lines
461 B
Ruby

# frozen_string_literal: true
module Database
class PartitionManagementWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
data_consistency :always
feature_category :database
idempotent!
def perform
Gitlab::Database::Partitioning::PartitionManager.new.sync_partitions
ensure
Gitlab::Database::Partitioning::PartitionMonitoring.new.report_metrics
end
end
end