Welcome to mirror list, hosted at ThFree Co, Russian Federation.

expireable.rb « dependency_proxy « concerns « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7e37db36bef09092a1d0fb0f46e4616bb59f4748 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module DependencyProxy
  module Expireable
    extend ActiveSupport::Concern

    UPDATE_BATCH_SIZE = 100

    private

    def expire_artifacts(collection)
      collection.each_batch(of: UPDATE_BATCH_SIZE) do |batch|
        batch.update_all(status: :pending_destruction)
      end
    end
  end
end