summaryrefslogtreecommitdiff
path: root/lib/gitlab/exclusive_lease_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/exclusive_lease_helpers.rb')
-rw-r--r--lib/gitlab/exclusive_lease_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/exclusive_lease_helpers.rb b/lib/gitlab/exclusive_lease_helpers.rb
index 7961d4bbd6e..2743b7ccdaa 100644
--- a/lib/gitlab/exclusive_lease_helpers.rb
+++ b/lib/gitlab/exclusive_lease_helpers.rb
@@ -12,7 +12,7 @@ module Gitlab
# because it holds the connection until all `retries` is consumed.
# This could potentially eat up all connection pools.
def in_lock(key, ttl: 1.minute, retries: 10, sleep_sec: 0.01.seconds)
- raise ArgumentError, 'Key needs to be specified' unless key
+ raise ArgumentError, _('Key needs to be specified') unless key
lease = Gitlab::ExclusiveLease.new(key, timeout: ttl)
@@ -23,7 +23,7 @@ module Gitlab
break if (retries -= 1) < 0
end
- raise FailedToObtainLockError, 'Failed to obtain a lock' unless uuid
+ raise FailedToObtainLockError, _('Failed to obtain a lock') unless uuid
yield
ensure