2022-01-12 12:59:36 +05:30
|
|
|
# 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|
|
2022-03-02 08:16:31 +05:30
|
|
|
batch.update_all(status: :pending_destruction)
|
2022-01-12 12:59:36 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|