diff --git a/changelog.d/20260803_102412_jwhite242_submit_sleep.md b/changelog.d/20260803_102412_jwhite242_submit_sleep.md new file mode 100644 index 00000000..0409aecf --- /dev/null +++ b/changelog.d/20260803_102412_jwhite242_submit_sleep.md @@ -0,0 +1,3 @@ +### Fixed + +- Guards sleep in submit loop to only trigger if a submission failure occurs. Significantly speeds up job submission rates which were previously capped at 1 per second due to this sleep. Implemented in [PR #481](https://github.com/llnl/maestrowf/pull/481). diff --git a/maestrowf/datastructures/core/executiongraph.py b/maestrowf/datastructures/core/executiongraph.py index bb18d01d..05f59c39 100644 --- a/maestrowf/datastructures/core/executiongraph.py +++ b/maestrowf/datastructures/core/executiongraph.py @@ -642,7 +642,8 @@ def _execute_record(self, record, adapter, restart=False): # Increment the number of restarts we've attempted. LOGGER.debug("Completed submission attempt %d", num_restarts) num_restarts += 1 - sleep((random.random() + 1) * num_restarts) + if retcode != SubmissionCode.OK: + sleep((random.random() + 1) * num_restarts) if retcode == SubmissionCode.OK: self.in_progress.add(record.name) diff --git a/pyproject.toml b/pyproject.toml index bebda974..f2075eab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool] [tool.poetry] name = "maestrowf" -version = "1.2.1dev4" +version = "1.2.1dev5" description = "A tool to easily orchestrate general computational workflows both locally and on supercomputers." license = "MIT License" classifiers = [