Skip to content

Commit

Permalink
Fix cleanup dependency when metp is not run that cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterKolczynski-NOAA committed Oct 1, 2024
1 parent 1e92c40 commit 18f9752
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2334,8 +2334,12 @@ def cleanup(self):
deps.append(rocoto.add_dependency(dep_dict))

if self.app_config.do_metp and self.run in ['gfs']:
deps2 = []
dep_dict = {'type': 'taskvalid', 'name': f'{self.run}metp', 'condition': 'not'}
deps2.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': f'{self.run}metp'}
deps.append(rocoto.add_dependency(dep_dict))
deps2.append(rocoto.add_dependency(dep_dict))
deps.append(rocoto.create_dependency(dep_condition='or', dep=deps2))

dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)

Expand Down

0 comments on commit 18f9752

Please sign in to comment.