diff options
Diffstat (limited to 'app/services/terraform/remote_state_handler.rb')
-rw-r--r-- | app/services/terraform/remote_state_handler.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/services/terraform/remote_state_handler.rb b/app/services/terraform/remote_state_handler.rb index e9a13cee764..f13477b8b34 100644 --- a/app/services/terraform/remote_state_handler.rb +++ b/app/services/terraform/remote_state_handler.rb @@ -2,8 +2,6 @@ module Terraform class RemoteStateHandler < BaseService - include Gitlab::OptimisticLocking - StateLockedError = Class.new(StandardError) UnauthorizedError = Class.new(StandardError) @@ -60,7 +58,7 @@ module Terraform private def retrieve_with_lock(find_only: false) - create_or_find!(find_only: find_only).tap { |state| retry_optimistic_lock(state, name: 'terraform_remote_state_handler_retrieve') { |state| yield state } } + create_or_find!(find_only: find_only).tap { |state| state.with_lock { yield state } } end def create_or_find!(find_only:) |