Skip to content

Commit

Permalink
Cannot remove success file if job failed, plus test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-riggs committed Nov 7, 2023
1 parent 4260d11 commit c34504d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/relion/zocalo/class2d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def run(self):
class2d_command, cwd=str(project_dir), capture_output=True
)
if not job_is_rerun:
(job_dir / "RELION_JOB_EXIT_SUCCESS").unlink()
(job_dir / "RELION_JOB_EXIT_SUCCESS").unlink(missing_ok=True)

# Register the Class2D job with the node creator
self.log.info(f"Sending {job_type} to node creator")
Expand Down
2 changes: 1 addition & 1 deletion src/relion/zocalo/class3d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def run(self):
class3d_command, cwd=str(project_dir), capture_output=True
)
if not job_is_rerun:
(job_dir / "RELION_JOB_EXIT_SUCCESS").unlink()
(job_dir / "RELION_JOB_EXIT_SUCCESS").unlink(missing_ok=True)

# Register the Class3D job with the node creator
self.log.info(f"Sending {job_type} to node creator")
Expand Down
6 changes: 4 additions & 2 deletions tests/zocalo/test_motioncorr_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def test_motioncorr_service_spa(
"1.0",
"-Patch",
"5 5",
"-Gpu",
"0",
"-Gain",
motioncorr_test_message["parameters"]["gain_ref"],
"-RotGain",
Expand All @@ -157,8 +159,6 @@ def test_motioncorr_service_spa(
"1",
"-Kv",
"300",
"-FmIntFile",
"fm_int_file",
"-Mag",
"mag1 mag2",
"-FtBin",
Expand Down Expand Up @@ -400,6 +400,8 @@ def test_motioncorr_service_tomo(
"1.0",
"-Patch",
"5 5",
"-Gpu",
"0",
"-Gain",
motioncorr_test_message["parameters"]["gain_ref"],
"-FmRef",
Expand Down

0 comments on commit c34504d

Please sign in to comment.