summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-02-28 10:41:35 -0800
committerhttp://jneen.net/ <jneen@jneen.net>2017-02-28 10:42:51 -0800
commit31b633306fec60766c3da97de64760ca132a7b75 (patch)
tree7d094422b0b9ad09230da89716533092ebe4be00
parent885fc1de06dbe21f1e329f5e3fe077ba02900d5e (diff)
downloadgitlab-ce-31b633306fec60766c3da97de64760ca132a7b75.tar.gz
use a more namespacey key for the exclusive leaserefactor/generalize-unique-internal-users
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index ba3c7991402..8443594c055 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1028,7 +1028,7 @@ class User < ActiveRecord::Base
def self.create_unique_internal(scope, username, email_pattern, &creation_block)
# Since we only want a single one of these in an instance, we use an
# exclusive lease to ensure than this block is never run concurrently.
- lease_key = "unique_internal_#{username}"
+ lease_key = "user:unique_internal:#{username}"
lease = Gitlab::ExclusiveLease.new(lease_key, timeout: 1.minute.to_i)
until uuid = lease.try_obtain