Skip to content

Commit

Permalink
Print a note when a task output timed out (#716)
Browse files Browse the repository at this point in the history
Related to osism/issues#785

Signed-off-by: Christian Berendt <berendt@osism.tech>
  • Loading branch information
berendt committed Dec 3, 2023
1 parent d3d9ca3 commit f4e1ba9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions osism/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@ def handle_task(t, wait, format, timeout):
elif message_type == "action" and message_content == "quit":
redis.close()
return rc
else:
logger.info(
f"There has been no output from the task {t.task_id} for {timeout} seconds. "
"This timeout can be adjusted using the --timeout parameter."
)
logger.info(
f"Task {t.task_id} is still running in background. No more output here. Check ARA for logs. "
f"Use this command to continue waiting for this task: osism wait --output --delay 2 {t.task_id}"
)
return 1

else:
if format == "log":
Expand Down

0 comments on commit f4e1ba9

Please sign in to comment.