Skip to content

Commit 2671942

Browse files
authored
Merge pull request #84 from seatable/opt-script-timeout-text
Opt script timeout text
2 parents 1ba29ce + b915ef2 commit 2671942

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

scheduler/app/faas_scheduler/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
# defaults...
2828
LOG_DIR = "/opt/scheduler/logs/"
2929
SUB_PROCESS_TIMEOUT = int(os.environ.get("PYTHON_PROCESS_TIMEOUT", 60 * 15))
30-
TIMEOUT_OUTPUT = "Script running for too long time!"
30+
TIMEOUT_OUTPUT = (
31+
"The script's running time exceeded the limit and the execution was aborted."
32+
)
3133
VERSION = os.getenv("VERSION")
3234

3335

scheduler/app/flask_server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
# defaults...
3434
SCRIPT_WORKERS = int(os.environ.get("PYTHON_SCHEDULER_SCRIPT_WORKERS", 5))
3535
SUB_PROCESS_TIMEOUT = int(os.environ.get("PYTHON_PROCESS_TIMEOUT", 60 * 15))
36-
TIMEOUT_OUTPUT = "Script running for too long time!"
36+
TIMEOUT_OUTPUT = (
37+
"The script's running time exceeded the limit and the execution was aborted."
38+
)
3739

3840
app = Flask(__name__)
3941

starter/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def run_python(data):
370370
send_to_scheduler(
371371
False,
372372
-1,
373-
"Script running for too long time!",
373+
"The script's running time exceeded the limit and the execution was aborted.",
374374
DEFAULT_SUB_PROCESS_TIMEOUT,
375375
data,
376376
)

0 commit comments

Comments
 (0)