diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/services/container_expiration_policy_service.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) | |
download | gitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/services/container_expiration_policy_service.rb')
-rw-r--r-- | app/services/container_expiration_policy_service.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/services/container_expiration_policy_service.rb b/app/services/container_expiration_policy_service.rb index 80f32298323..cf5d702a9ef 100644 --- a/app/services/container_expiration_policy_service.rb +++ b/app/services/container_expiration_policy_service.rb @@ -4,20 +4,14 @@ class ContainerExpirationPolicyService < BaseService InvalidPolicyError = Class.new(StandardError) def execute(container_expiration_policy) - unless container_expiration_policy.valid? - container_expiration_policy.disable! - raise InvalidPolicyError - end - container_expiration_policy.schedule_next_run! container_expiration_policy.container_repositories.find_each do |container_repository| CleanupContainerRepositoryWorker.perform_async( nil, container_repository.id, - container_expiration_policy.attributes - .except('created_at', 'updated_at') - .merge(container_expiration_policy: true) + container_expiration_policy.policy_params + .merge(container_expiration_policy: true) ) end end |