debian-mirror-gitlab/app/workers/partition_creation_worker.rb
2020-11-24 15:15:51 +05:30

15 lines
388 B
Ruby

# frozen_string_literal: true
class PartitionCreationWorker
include ApplicationWorker
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