gitlab-org--gitlab-foss/app/models/uploads/base.rb
Mayra Cabrera 0ab89d8e36 Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-10 19:26:47 +00:00

19 lines
405 B
Ruby

# frozen_string_literal: true
module Uploads
class Base
BATCH_SIZE = 100
attr_reader :logger
def initialize(logger: nil)
@logger ||= Rails.logger # rubocop:disable Gitlab/RailsLogger
end
def delete_keys_async(keys_to_delete)
keys_to_delete.each_slice(BATCH_SIZE) do |batch|
DeleteStoredFilesWorker.perform_async(self.class, batch)
end
end
end
end