提交 5a4d2ad0 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

During compilation, wait for some time before retrying after an exception

上级 57c025ae
...@@ -227,8 +227,10 @@ def lock(tmp_dir, timeout=120, min_wait=5, max_wait=10, verbosity=1): ...@@ -227,8 +227,10 @@ def lock(tmp_dir, timeout=120, min_wait=5, max_wait=10, verbosity=1):
# We got the lock, hoorray! # We got the lock, hoorray!
return return
except: except Exception, e:
# If something wrong happened, we try again. # If something wrong happened, we try again.
warning("Something wrong happened:", type(e), e)
time.sleep(random.uniform(min_wait, max_wait))
continue continue
def refresh_lock(lock_file): def refresh_lock(lock_file):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论