summaryrefslogtreecommitdiff
path: root/lib/gitlab/exclusive_lease.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-10 18:39:50 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-10 18:39:50 +0100
commit261214efc270623157d13a62e508b2a7f848b250 (patch)
tree682f0861fc28d16e890abfd7b58aa3204fd5a81d /lib/gitlab/exclusive_lease.rb
parentf4d478a6a84c9f576df3fe1c80f3ccf2ee0c94f5 (diff)
downloadgitlab-ce-261214efc270623157d13a62e508b2a7f848b250.tar.gz
Make comment less ambivalent
Diffstat (limited to 'lib/gitlab/exclusive_lease.rb')
-rw-r--r--lib/gitlab/exclusive_lease.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/exclusive_lease.rb b/lib/gitlab/exclusive_lease.rb
index 324e32a5c68..1d2d6981c59 100644
--- a/lib/gitlab/exclusive_lease.rb
+++ b/lib/gitlab/exclusive_lease.rb
@@ -23,8 +23,7 @@ module Gitlab
# Try to obtain the lease. Return true on succes,
# false if the lease is already taken.
def try_obtain
- # This is expected to be atomic because we are talking to a
- # single-threaded Redis server.
+ # Performing a single SET is atomic
!!redis.set(redis_key, '1', nx: true, ex: @timeout)
end