Skip to content

Commit

Permalink
experimental push stopped flows downstream
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Jul 31, 2020
1 parent 92f2282 commit a87c846
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cylc/uiserver/data_store_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ async def sync_workflow(self, w_id, *args, **kwargs):
)
await self.entire_workflow_update(ids=[w_id])

async def register_workflow(self, w_id):
flow = deepcopy(DATA_TEMPLATE)
flow['status'] = 'stopped'
self.data[w_id] = flow

def purge_workflow(self, w_id):
"""Purge the manager of a workflow's subscription and data."""
if w_id in self.w_subs:
Expand Down
3 changes: 3 additions & 0 deletions cylc/uiserver/workflows_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ async def gather_workflows(self):
if wid in active_before:
self.active.pop(wid)
if wid not in inactive_before:
await self.uiserver.data_store_mgr.register_workflow(
wid
)
self.inactive.add(wid)
continue

Expand Down

0 comments on commit a87c846

Please sign in to comment.