提交 de47cda1 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Display a warning if a lock has timed out.

上级 8aefe5be
......@@ -161,6 +161,13 @@ def lock(tmp_dir, timeout=120, min_wait=5, max_wait=10, verbosity=1):
if (timeout is not None and
time.time() - time_start >= timeout):
# Timeout exceeded.
if not no_display:
if read_owner == 'failure':
msg = 'unknown process'
else:
msg = "process '%s'" % read_owner.split('_')[0]
warning("Overriding existing lock by %s (I am "
"process '%s')"% (msg, my_pid))
get_lock.unlocker.unlock()
continue
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论