diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-14 03:08:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-14 03:08:43 +0300 |
commit | 30da0e79d286cdf137e958ab53ef992f86d8661d (patch) | |
tree | 038ebb1da587e33eb52e764c7a1f37119dd791d6 /app/services/terraform | |
parent | 4ea2496094922fc17d9f7f84c2a44d691c483190 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/terraform')
-rw-r--r-- | app/services/terraform/states/destroy_service.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/services/terraform/states/destroy_service.rb b/app/services/terraform/states/destroy_service.rb index 76fd0f9433d..728533a60ed 100644 --- a/app/services/terraform/states/destroy_service.rb +++ b/app/services/terraform/states/destroy_service.rb @@ -11,9 +11,7 @@ module Terraform return unless state.deleted_at? state.versions.each_batch(column: :version) do |batch| - batch.each do |version| - version.file.remove! - end + process_batch(batch) end state.destroy! @@ -22,6 +20,15 @@ module Terraform private attr_reader :state + + # Overridden in EE + def process_batch(batch) + batch.each do |version| + version.file.remove! + end + end end end end + +Terraform::States::DestroyService.prepend_mod |