Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cwltool/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ def arg_parser() -> argparse.ArgumentParser:
parser.add_argument(
"--eval-timeout",
help="Time to wait for a Javascript expression to evaluate before giving "
"an error, default 20s.",
"an error, default 60s.",
type=float,
default=20,
default=60,
)

provgroup = parser.add_argument_group(
Expand Down
2 changes: 1 addition & 1 deletion cwltool/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __init__(self, kwargs: Optional[Dict[str, Any]] = None) -> None:
self.js_console = False # type: bool
self.job_script_provider = None # type: Optional[DependenciesConfiguration]
self.select_resources = None # type: Optional[select_resources_callable]
self.eval_timeout = 20 # type: float
self.eval_timeout = 60 # type: float
self.postScatterEval = (
None
) # type: Optional[Callable[[CWLObjectType], Optional[CWLObjectType]]]
Expand Down
14 changes: 11 additions & 3 deletions cwltool/sandboxjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,20 @@ def process_finished() -> bool:
pipes[1].write(buf)
except OSError:
break
timer.cancel()

stdin_buf.close()
stdoutdata = stdout_buf.getvalue()[: -len(PROCESS_FINISHED_STR) - 1]
stderrdata = stderr_buf.getvalue()[: -len(PROCESS_FINISHED_STR) - 1]

if not timer.is_alive():
_logger.info("Expression Tool stopped because time limit has been exceeded.")
_logger.info("Time limit is {} seconds. This can be increased using the --eval-timeout flag.\n".format(timeout))
stdoutdata = stdout_buf.getvalue()
stderrdata = stderr_buf.getvalue()
else:
stdoutdata = stdout_buf.getvalue()[: -len(PROCESS_FINISHED_STR) - 1]
stderrdata = stderr_buf.getvalue()[: -len(PROCESS_FINISHED_STR) - 1]

timer.cancel()

nodejs.poll()

if nodejs.poll() not in (None, 0):
Expand Down