Skip to content

Commit e0c6cc3

Browse files
committed
Fix maximum workflow invocation duration test
Broke this in #20522 ... the functionality still works, it's just that we'd have to wait for the 5 minute backfill.
1 parent 50d2eb3 commit e0c6cc3

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)