Skip to content

Commit

Permalink
Datastore fix for removed taskdef.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Aug 14, 2022
1 parent 138ec26 commit e8c2b1e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cylc/flow/data_store_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,12 +818,15 @@ def generate_ghost_task(self, tp_id, itask, is_parent=False):
if is_orphan:
self.generate_orphan_task(itask)

# Most the time the definition node will be in the store,
# so use try/except.
# Most of the time the definition node will be in the store,
try:
task_def = self.data[self.workflow_id][TASKS][t_id]
except KeyError:
task_def = self.added[TASKS][t_id]
try:
task_def = self.added[TASKS][t_id]
except KeyError:
# Task removed from workflow definition.
return False

update_time = time()
tp_stamp = f'{tp_id}@{update_time}'
Expand Down

0 comments on commit e8c2b1e

Please sign in to comment.