Skip to content

Commit

Permalink
Don't poll on restart if task pool empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed May 15, 2023
1 parent cea2037 commit 57af67d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,10 @@ async def run_scheduler(self) -> None:
self.task_job_mgr.task_remote_mgr.is_restart = True
self.task_job_mgr.task_remote_mgr.rsync_includes = (
self.config.get_validated_rsync_includes())
self.restart_remote_init()
self.command_poll_tasks(['*/*'])
if self.pool.get_all_tasks():
# (If we're not restarting a finished workflow)
self.restart_remote_init()
self.command_poll_tasks(['*/*'])

self.run_event_handlers(self.EVENT_STARTUP, 'workflow starting')
await asyncio.gather(
Expand Down

0 comments on commit 57af67d

Please sign in to comment.