Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete public DB if private DB does not exist on scheduler start #6070

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
@@ -307,6 +307,13 @@ 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()
):
# Delete pub DB if pri DB doesn't exist, as we don't want to
# load anything (e.g. template variables) from it
os.unlink(self.workflow_db_mgr.pub_path)

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