2020-07-14 20:09:23 -04:00
|
|
|
# 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-09-02 08:10:35 -04:00
|
|
|
ensure
|
|
|
|
Gitlab::Database::Partitioning::PartitionMonitoring.new.report_metrics
|
2020-07-14 20:09:23 -04:00
|
|
|
end
|
|
|
|
end
|