From f4e1ba9db3f253ff5c69385eaabe218eb53c4b6d Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Sun, 3 Dec 2023 15:05:01 +0100 Subject: [PATCH] Print a note when a task output timed out (#716) Related to osism/issues#785 Signed-off-by: Christian Berendt --- osism/tasks/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/osism/tasks/__init__.py b/osism/tasks/__init__.py index 37d6f6d8..bb997f98 100644 --- a/osism/tasks/__init__.py +++ b/osism/tasks/__init__.py @@ -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":