Skip to content

Commit

Permalink
polish task log/status
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed Aug 22, 2020
1 parent 679d5f3 commit c2534b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WDL/runtime/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def run_local_task(
logger_prefix = (logger_prefix or ["wdl"]) + ["t:" + run_id]
logger = logging.getLogger(".".join(logger_prefix))
with ExitStack() as cleanup:
cleanup.enter_context(_statusbar.task_slotted())
terminating = cleanup.enter_context(TerminationSignalFlag(logger))
if terminating():
raise Terminated(quiet=True)
Expand All @@ -88,9 +87,9 @@ def run_local_task(
line=task.pos.line,
column=task.pos.column,
dir=run_dir,
thread=threading.get_ident(),
)
)
logger.info(_("thread", ident=threading.get_ident()))
write_values_json(inputs, os.path.join(run_dir, "inputs.json"))

if not _run_id_stack:
Expand Down Expand Up @@ -177,6 +176,7 @@ def run_local_task(
command, container = (recv[k] for k in ("command", "container"))

# start container & run command (and retry if needed)
cleanup.enter_context(_statusbar.task_slotted())
_try_task(cfg, logger, container, command, terminating)

# evaluate output declarations
Expand Down

0 comments on commit c2534b3

Please sign in to comment.