Skip to content

Commit 1ce0634

Browse files
authored
Merge pull request #20729 from mvdbeek/max_duration_test_fix
[25.0] Fix maximum workflow invocation duration test
2 parents 50d2eb3 + e0c6cc3 commit 1ce0634

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/galaxy/workflow/scheduling_manager.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,12 @@ def __init__(self, app: MinimalManagerApp, workflow_scheduling_manager):
305305
)
306306
self.invocation_grabber = None
307307
self.update_time_tracking_dict: Dict[int, datetime] = {}
308-
self.timedelta = timedelta(seconds=DEFAULT_SCHEDULER_BACKFILL_SECONDS)
308+
backfill_seconds = (
309+
min(app.config.maximum_workflow_invocation_duration, DEFAULT_SCHEDULER_BACKFILL_SECONDS)
310+
if app.config.maximum_workflow_invocation_duration > 0
311+
else DEFAULT_SCHEDULER_BACKFILL_SECONDS
312+
)
313+
self.timedelta = timedelta(seconds=backfill_seconds)
309314
self_handler_tags = set(self.app.job_config.self_handler_tags)
310315
self_handler_tags.add(self.workflow_scheduling_manager.default_handler_id)
311316
handler_assignment_method = InvocationGrabber.get_grabbable_handler_assignment_method(

0 commit comments

Comments
 (0)