Просмотр исходного кода

increase lock time to 5 minutes

Brian Gough 11 лет назад
Родитель
Сommit
8226bf3be4
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/track-changes/app/coffee/LockManager.coffee

+ 1 - 1
services/track-changes/app/coffee/LockManager.coffee

@@ -5,7 +5,7 @@ rclient = redis.createClient(Settings.redis.web)
 module.exports = LockManager =
 module.exports = LockManager =
 	LOCK_TEST_INTERVAL: 50 # 50ms between each test of the lock
 	LOCK_TEST_INTERVAL: 50 # 50ms between each test of the lock
 	MAX_LOCK_WAIT_TIME: 10000 # 10s maximum time to spend trying to get the lock
 	MAX_LOCK_WAIT_TIME: 10000 # 10s maximum time to spend trying to get the lock
-	LOCK_TTL: 10 # seconds
+	LOCK_TTL: 300 # seconds (allow 5 minutes for any operation to complete)
 
 
 	tryLock : (key, callback = (err, gotLock) ->) ->
 	tryLock : (key, callback = (err, gotLock) ->) ->
 		rclient.set key, "locked", "EX", @LOCK_TTL, "NX", (err, gotLock)->
 		rclient.set key, "locked", "EX", @LOCK_TTL, "NX", (err, gotLock)->