debian-mirror-gitlab/app/workers/partition_creation_worker.rb
2021-06-08 01:23:25 +05:30

17 lines
416 B
Ruby

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