diff --git a/cylc/flow/scheduler.py b/cylc/flow/scheduler.py index f7477a44c8d..018c8f84576 100644 --- a/cylc/flow/scheduler.py +++ b/cylc/flow/scheduler.py @@ -1775,6 +1775,8 @@ async def main_loop(self) -> None: with suppress(KeyError): self.timers[self.EVENT_STALL_TIMEOUT].stop() + # Database update + self.workflow_db_mgr.put_task_pool(self.pool) self.update_data_store() self.process_workflow_db_queue() @@ -1859,8 +1861,6 @@ async def update_data_structure(self, reloaded: bool = False): # Non-async sleep - yield to other threads rather # than event loop sleep(0) - # Database update - self.workflow_db_mgr.put_task_pool(self.pool) def check_workflow_timers(self): """Check timers, and abort or run event handlers as configured."""