From 64bb63341d2ada5d392d58f85c994501918b8037 Mon Sep 17 00:00:00 2001 From: Moritz Makowski Date: Mon, 13 Nov 2023 15:52:27 +0100 Subject: [PATCH] Update API reference --- docs/pages/api-reference.md | 6 +++++- scripts/generate_docs.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/pages/api-reference.md b/docs/pages/api-reference.md index 9521314..773147b 100644 --- a/docs/pages/api-reference.md +++ b/docs/pages/api-reference.md @@ -405,12 +405,16 @@ will be used as the working directory for the process. ##### `terminate_process` ```python -def terminate_process(script_path: str) -> list[int] +def terminate_process(script_path: str, + termination_timeout: Optional[int] = None) -> list[int] ``` Terminate all processes that have the given script as their entrypoint. Returns the list of terminated PIDs. +If `termination_timeout` is not None, the processes will be +terminated forcefully after the given timeout (in seconds). + ## `tum_esm_utils.shell` diff --git a/scripts/generate_docs.py b/scripts/generate_docs.py index f38064d..9ea159f 100644 --- a/scripts/generate_docs.py +++ b/scripts/generate_docs.py @@ -1,3 +1,4 @@ +from __future__ import annotations import os import tempfile