From 1d3e8377e6c7d32774c144e60ea1252c641e88c6 Mon Sep 17 00:00:00 2001 From: tonynoce Date: Tue, 24 Dec 2024 16:57:11 -0300 Subject: [PATCH 1/2] modified: main.py --- main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ccc99fdc..bd379f92 100644 --- a/main.py +++ b/main.py @@ -183,7 +183,13 @@ def prompt_worker(q, server_instance): current_time = time.perf_counter() execution_time = current_time - execution_start_time - logging.info("Prompt executed in {:.2f} seconds".format(execution_time)) + + # Log Time in a more readable way after 10 minutes + if execution_time > 600: + execution_time = time.strftime("%H:%M:%S", time.gmtime(execution_time)) + logging.info("Prompt executed in", execution_time) + else: + logging.info("Prompt executed in {:.2f} seconds".format(execution_time)) flags = q.get_flags() free_memory = flags.get("free_memory", False) From b0d8059f9ffba310dfb43b036c169408fec5ef3f Mon Sep 17 00:00:00 2001 From: Lucas - BLOCK33 <95554128+tonynoce@users.noreply.github.com> Date: Tue, 24 Dec 2024 18:56:41 -0300 Subject: [PATCH 2/2] Update main.py --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index bd379f92..541e6a3f 100644 --- a/main.py +++ b/main.py @@ -187,7 +187,7 @@ def prompt_worker(q, server_instance): # Log Time in a more readable way after 10 minutes if execution_time > 600: execution_time = time.strftime("%H:%M:%S", time.gmtime(execution_time)) - logging.info("Prompt executed in", execution_time) + logging.info(f"Prompt executed in {execution_time}") else: logging.info("Prompt executed in {:.2f} seconds".format(execution_time))