Class: Packages::Cleanup::ExecutePolicyService

Inherits:
Object
  • Object
show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/services/packages/cleanup/execute_policy_service.rb

Constant Summary collapse

MAX_EXECUTION_TIME =
250.seconds
DUPLICATED_FILES_BATCH_SIZE =
10_000
MARK_PACKAGE_FILES_FOR_DESTRUCTION_SERVICE_BATCH_SIZE =
200

Instance Method Summary collapse

Constructor Details

#initialize(policy) ⇒ ExecutePolicyService

Returns a new instance of ExecutePolicyService.



13
14
15
16
17
18
19
# File 'app/services/packages/cleanup/execute_policy_service.rb', line 13

def initialize(policy)
  @policy = policy
  @counts = {
    marked_package_files_total_count: 0,
    unique_package_id_and_file_name_total_count: 0
  }
end

Instance Method Details

#executeObject



21
22
23
# File 'app/services/packages/cleanup/execute_policy_service.rb', line 21

def execute
  cleanup_duplicated_files
end