debian-mirror-gitlab/app/workers/database/partition_management_worker.rb
2021-09-30 23:02:18 +05:30

19 lines
460 B
Ruby

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