summaryrefslogtreecommitdiff
path: root/app/workers/database/partition_management_worker.rb
blob: c9b1cd6d261f53bd33518740fe7bfa3f6ca7ed67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Database
  class PartitionManagementWorker
    include ApplicationWorker

    sidekiq_options retry: 3
    include CronjobQueue # rubocop:disable Scalability/CronWorkerContext

    feature_category :database
    idempotent!

    def perform
      Gitlab::Database::Partitioning::PartitionManager.new.sync_partitions
    ensure
      Gitlab::Database::Partitioning::PartitionMonitoring.new.report_metrics
    end
  end
end