##// END OF EJS Templates
cache: fix overwrite of flock timeout, and improve logging.
marcink -
r2947:21c6c394 default
parent child Browse files
Show More
@@ -108,11 +108,13 b' class CustomLockFactory(FileLock):'
108 raise
108 raise
109 elif (time.time() - start_lock_time) > timeout:
109 elif (time.time() - start_lock_time) > timeout:
110 # waited to much time on a lock, better fail than loop for ever
110 # waited to much time on a lock, better fail than loop for ever
111 log.error('Failed to acquire lock on %s file', self.filename)
111 log.error('Failed to acquire lock on `%s` after waiting %ss',
112 self.filename, timeout)
112 raise
113 raise
113 timeout = 0.03
114 wait_timeout = 0.03
114 log.debug('Failed to acquire lock, retry in %ss', timeout)
115 log.debug('Failed to acquire lock on `%s`, retry in %ss',
115 gevent.sleep(timeout)
116 self.filename, wait_timeout)
117 gevent.sleep(wait_timeout)
116
118
117 fcntl.flock = gevent_flock
119 fcntl.flock = gevent_flock
118 return fcntl
120 return fcntl
General Comments 0
You need to be logged in to leave comments. Login now