Browse Source

Really really prevent the stampede

David Cramer 12 years ago
parent
commit
230f7ba089
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/sentry/buffer/redis.py

+ 2 - 1
src/sentry/buffer/redis.py

@@ -96,7 +96,8 @@ class RedisBuffer(Buffer):
         # prevent a stampede due to the way we use celery etas + duplicate
         # tasks
         if not self.conn.setnx(lock_key, '1'):
-            self.conn.expire(lock_key, self.delay)
+            return
+        self.conn.expire(lock_key, self.delay)
 
         results = {}
         with self.conn.map() as conn: