Browse Source

removed unneeded default function arg preventing from decaffeination

mserranom 6 years ago
parent
commit
e37c261bb0

+ 1 - 1
services/clsi/app/coffee/DockerLockManager.coffee

@@ -46,7 +46,7 @@ module.exports = LockManager =
 			logger.error {key:key, lock: existingLock}, "tried to release lock that has gone"
 			logger.error {key:key, lock: existingLock}, "tried to release lock that has gone"
 			callback()
 			callback()
 
 
-	runWithLock: (key, runner = ( (releaseLock = (error) ->) -> ), callback = ( (error) -> )) ->
+	runWithLock: (key, runner, callback = ( (error) -> )) ->
 		LockManager.getLock key, (error, lockValue) ->
 		LockManager.getLock key, (error, lockValue) ->
 			return callback(error) if error?
 			return callback(error) if error?
 			runner (error1, args...) ->
 			runner (error1, args...) ->

+ 1 - 1
services/clsi/app/coffee/LockManager.coffee

@@ -9,7 +9,7 @@ module.exports = LockManager =
 	MAX_LOCK_WAIT_TIME: 15000 # 10s maximum time to spend trying to get the lock
 	MAX_LOCK_WAIT_TIME: 15000 # 10s maximum time to spend trying to get the lock
 	LOCK_STALE: 5*60*1000 # 5 mins time until lock auto expires
 	LOCK_STALE: 5*60*1000 # 5 mins time until lock auto expires
 
 
-	runWithLock: (path, runner = ((releaseLock = (error) ->) ->), callback = ((error) ->)) ->
+	runWithLock: (path, runner, callback = ((error) ->)) ->
 		lockOpts =
 		lockOpts =
 			wait: @MAX_LOCK_WAIT_TIME
 			wait: @MAX_LOCK_WAIT_TIME
 			pollPeriod: @LOCK_TEST_INTERVAL
 			pollPeriod: @LOCK_TEST_INTERVAL