diff options
Diffstat (limited to 'app/workers/container_expiration_policies/cleanup_container_repository_worker.rb')
-rw-r--r-- | app/workers/container_expiration_policies/cleanup_container_repository_worker.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/workers/container_expiration_policies/cleanup_container_repository_worker.rb b/app/workers/container_expiration_policies/cleanup_container_repository_worker.rb index 3027d46b8b1..33dda6a8f0c 100644 --- a/app/workers/container_expiration_policies/cleanup_container_repository_worker.rb +++ b/app/workers/container_expiration_policies/cleanup_container_repository_worker.rb @@ -49,15 +49,11 @@ module ContainerExpirationPolicies end def remaining_work_count - total_count = cleanup_scheduled_count + cleanup_unfinished_count + count = cleanup_scheduled_count - log_info( - cleanup_scheduled_count: cleanup_scheduled_count, - cleanup_unfinished_count: cleanup_unfinished_count, - cleanup_total_count: total_count - ) + return count if count > max_running_jobs - total_count + count + cleanup_unfinished_count end private |