Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
hwikle-lanl committed Feb 4, 2025
1 parent 62df721 commit f7b6152
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/pavilion/test_run/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,16 +861,20 @@ def _finalize_complete_file(self, complete_path: Path, complete_tmp_path: Path,
complete_tmp_path.rename(complete_path)
else:
status.set(STATES.INFO,
f"File {self.COMPLETE_FN} does not yet exist on local file system. "
f"File {self.COMPLETE_FN}.tmp does not yet exist on local file system. "
"Attempting to force NFS cache refresh.")

# Force an NFS cache update
consume(complete_tmp_path.parent.iterdir())

if not complete_tmp_path.exists():
if complete_tmp_path.exists():
complete_tmp_path.rename(complete_path)
else:
status.set(STATES.WARNING,
f"File {self.COMPLETE_FN} does not yet exist on local file "
"system. Falling back on symlink to temporary file location.")
f"Forced cache refresh failed for{self.COMPLETE_FN}.tmp. Falling "
"back on symlink to temporary file location.")

# Symlink with the expectation that the temp file will be there eventually
complete_path.symlink_to(complete_tmp_path)

self._complete = True
Expand Down

0 comments on commit f7b6152

Please sign in to comment.