Skip to content

Commit

Permalink
Wipe pub DB if pri DB does not exist on scheduler start
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Apr 17, 2024
1 parent 4b70574 commit ea5b691
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ def __init__(self, id_: str, options: 'Values') -> None:
pub_d=os.path.join(self.workflow_run_dir, 'log')
)
self.is_restart = Path(self.workflow_db_mgr.pri_path).is_file()
if (
not self.is_restart
and Path(self.workflow_db_mgr.pub_path).is_file()
):
os.unlink(self.workflow_db_mgr.pub_path)

Check warning on line 314 in cylc/flow/scheduler.py

View check run for this annotation

Codecov / codecov/patch

cylc/flow/scheduler.py#L314

Added line #L314 was not covered by tests

# Map used to track incomplete remote inits for restart
# {install_target: platform}
Expand Down

0 comments on commit ea5b691

Please sign in to comment.