2020-07-28 23:09:34 +05:30
|
|
|
# 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
|
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
|