gitlab-org--gitlab-foss/app/workers/database/partition_management_worker.rb

21 lines
439 B
Ruby
Raw Normal View History

# 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.sync_partitions
ensure
Gitlab::Database::Partitioning::PartitionMonitoring.new.report_metrics
end
end
end