Commit 393b5270 authored by Kirill Smelkov's avatar Kirill Smelkov

fixup! amari.xlog: Move main logger to a thread

In 79d10eb9 that patch wired ctx through xlog callchains and added
corresponding handling of cancellation. But I overlooked one place where
plain sleep was used.

-> Fix it.
parent 2a016d48
......@@ -145,7 +145,12 @@ def xlog(ctx, wsuri, logspecv):
# e.g. disk full in xl.jemit itself
log.exception('xlog failure (second level):')
time.sleep(3)
_, _rx = select(
ctx.done().recv, # 0
time.after(3).recv, # 1
)
if _ == 0:
raise ctx.err()
# _XLogger serves xlog implementation.
class _XLogger:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment