Skip to content

Commit

Permalink
revert condition change
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Jul 27, 2023
1 parent de07f86 commit bfa514f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions changes.d/5650.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug preventing clean-up of finished tasks in the GUI and TUI.
24 changes: 11 additions & 13 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ async def main_loop(self) -> None:
self.timers[self.EVENT_RESTART_TIMEOUT].stop()
self.is_restart_timeout_wait = False

if has_updated:
if has_updated or self.data_store_mgr.updates_pending:
# Update the datastore.
await self.update_data_structure(self.is_reloaded)

Expand Down Expand Up @@ -1846,18 +1846,16 @@ def _update_workflow_state(self):

async def update_data_structure(self, reloaded: bool = False):
"""Update DB, UIS, Summary data elements"""
# Add tasks that have moved from runahead to live pool.
if self.data_store_mgr.updates_pending:
# Collect/apply data store updates/deltas
self.data_store_mgr.update_data_structure(reloaded=reloaded)
# Publish updates:
if self.data_store_mgr.publish_pending:
self.data_store_mgr.publish_pending = False
self.server.publish_queue.put(
self.data_store_mgr.publish_deltas)
# Non-async sleep - yield to other threads rather
# than event loop
sleep(0)
# Collect/apply data store updates/deltas
self.data_store_mgr.update_data_structure(reloaded=reloaded)
# Publish updates:
if self.data_store_mgr.publish_pending:
self.data_store_mgr.publish_pending = False
self.server.publish_queue.put(
self.data_store_mgr.publish_deltas)
# Non-async sleep - yield to other threads rather
# than event loop
sleep(0)
# Database update
self.workflow_db_mgr.put_task_pool(self.pool)
self.update_data_store()
Expand Down

0 comments on commit bfa514f

Please sign in to comment.