Skip to content

Commit 8a5d915

Browse files
committed
js timeout: docs
1 parent 7a9a764 commit 8a5d915

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

cwl_utils/expression.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ def do_eval(
289289
cwlVersion: str = "",
290290
**kwargs: Any,
291291
) -> Optional[CWLOutputType]:
292+
"""
293+
Evaluate the given CWL expression, in context.
294+
295+
:param timeout: The maximum number of seconds to wait while executing.
296+
"""
292297
runtime = cast(MutableMapping[str, Union[int, str, None]], copy.deepcopy(resources))
293298
runtime["tmpdir"] = tmpdir if tmpdir else None
294299
runtime["outdir"] = outdir if outdir else None

cwl_utils/sandboxjs.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from cwl_utils.utils import singularity_supports_userns
3535

3636
default_timeout = 20
37+
"""Default number of seconds to wait while running a javascript engine."""
3738

3839
seg_symbol = r"""\w+"""
3940
seg_single = r"""\['([^']|\\')+'\]"""
@@ -164,6 +165,13 @@ def exec_js_process(
164165
force_docker_pull: bool = False,
165166
container_engine: str = "docker",
166167
) -> Tuple[int, str, str]:
168+
"""
169+
Run a javascript text.
170+
171+
:param timeout: Max number of seconds to wait.
172+
:returns: A tuple of the return code, stdout, and stderr of the javascript
173+
engine invocation.
174+
"""
167175
if not hasattr(self.localdata, "procs"):
168176
self.localdata.procs = {}
169177

0 commit comments

Comments
 (0)