From 306faac7d0f542074ab748db49989a613b4da6f9 Mon Sep 17 00:00:00 2001 From: Alex Happy <1223408988@qq.com> Date: Tue, 1 Jul 2025 14:11:32 +0800 Subject: [PATCH 1/3] starter/runner.py --- starter/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starter/runner.py b/starter/runner.py index b56a8d4..e4cb429 100644 --- a/starter/runner.py +++ b/starter/runner.py @@ -370,7 +370,7 @@ def run_python(data): send_to_scheduler( False, -1, - "Script running for too long time!", + "The script's running time exceeded the limit and the execution was aborted.", DEFAULT_SUB_PROCESS_TIMEOUT, data, ) From fe8630b6baef9208bebe9f1dcc2ee4d14f52c2b4 Mon Sep 17 00:00:00 2001 From: Alex Happy <1223408988@qq.com> Date: Tue, 1 Jul 2025 14:12:41 +0800 Subject: [PATCH 2/3] opt scheduler script timeout text --- scheduler/app/faas_scheduler/utils.py | 2 +- scheduler/app/flask_server.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scheduler/app/faas_scheduler/utils.py b/scheduler/app/faas_scheduler/utils.py index 516a966..aa36fa2 100644 --- a/scheduler/app/faas_scheduler/utils.py +++ b/scheduler/app/faas_scheduler/utils.py @@ -27,7 +27,7 @@ # defaults... LOG_DIR = "/opt/scheduler/logs/" SUB_PROCESS_TIMEOUT = int(os.environ.get("PYTHON_PROCESS_TIMEOUT", 60 * 15)) -TIMEOUT_OUTPUT = "Script running for too long time!" +TIMEOUT_OUTPUT = "The script's running time exceeded the limit and the execution was aborted." VERSION = os.getenv("VERSION") diff --git a/scheduler/app/flask_server.py b/scheduler/app/flask_server.py index 5fe48c7..cfdbbb5 100644 --- a/scheduler/app/flask_server.py +++ b/scheduler/app/flask_server.py @@ -33,7 +33,7 @@ # defaults... SCRIPT_WORKERS = int(os.environ.get("PYTHON_SCHEDULER_SCRIPT_WORKERS", 5)) SUB_PROCESS_TIMEOUT = int(os.environ.get("PYTHON_PROCESS_TIMEOUT", 60 * 15)) -TIMEOUT_OUTPUT = "Script running for too long time!" +TIMEOUT_OUTPUT = "The script's running time exceeded the limit and the execution was aborted." app = Flask(__name__) From b915ef28d4f6b0a40d85487c5511d2a5da0fca24 Mon Sep 17 00:00:00 2001 From: Alex Happy <1223408988@qq.com> Date: Tue, 1 Jul 2025 14:18:48 +0800 Subject: [PATCH 3/3] fix black check --- scheduler/app/faas_scheduler/utils.py | 4 +++- scheduler/app/flask_server.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scheduler/app/faas_scheduler/utils.py b/scheduler/app/faas_scheduler/utils.py index aa36fa2..f43af3d 100644 --- a/scheduler/app/faas_scheduler/utils.py +++ b/scheduler/app/faas_scheduler/utils.py @@ -27,7 +27,9 @@ # defaults... LOG_DIR = "/opt/scheduler/logs/" SUB_PROCESS_TIMEOUT = int(os.environ.get("PYTHON_PROCESS_TIMEOUT", 60 * 15)) -TIMEOUT_OUTPUT = "The script's running time exceeded the limit and the execution was aborted." +TIMEOUT_OUTPUT = ( + "The script's running time exceeded the limit and the execution was aborted." +) VERSION = os.getenv("VERSION") diff --git a/scheduler/app/flask_server.py b/scheduler/app/flask_server.py index cfdbbb5..77feb16 100644 --- a/scheduler/app/flask_server.py +++ b/scheduler/app/flask_server.py @@ -33,7 +33,9 @@ # defaults... SCRIPT_WORKERS = int(os.environ.get("PYTHON_SCHEDULER_SCRIPT_WORKERS", 5)) SUB_PROCESS_TIMEOUT = int(os.environ.get("PYTHON_PROCESS_TIMEOUT", 60 * 15)) -TIMEOUT_OUTPUT = "The script's running time exceeded the limit and the execution was aborted." +TIMEOUT_OUTPUT = ( + "The script's running time exceeded the limit and the execution was aborted." +) app = Flask(__name__)