debian-mirror-gitlab/app/workers/partition_creation_worker.rb

18 lines
416 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
class PartitionCreationWorker
include ApplicationWorker
2021-06-08 01:23:25 +05:30
sidekiq_options retry: 3
2020-07-28 23:09:34 +05:30
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :database
idempotent!
def perform
Gitlab::Database::Partitioning::PartitionCreator.new.create_partitions
2020-11-24 15:15:51 +05:30
ensure
Gitlab::Database::Partitioning::PartitionMonitoring.new.report_metrics
2020-07-28 23:09:34 +05:30
end
end