Skip to content

Commit

Permalink
Make link of the updated longterm datacheck file in a common directory
Browse files Browse the repository at this point in the history
  • Loading branch information
marialainez committed Feb 7, 2024
1 parent 490b902 commit 2f4459e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/osa/scripts/closer.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,14 @@ def cherenkov_transparency(cmd: List[str]):
log.info("Update longterm dl1 check file with cherenkov_transparency script.")
log.debug(f"Executing {stringify(cmd)}")

nightdir = date_to_dir(options.date)
longterm_dir = Path(cfg.get("LST1", "LONGTERM_DIR")) / options.prod_id / nightdir
longterm_datacheck_file = longterm_dir / f"DL1_datacheck_{nightdir}.h5"
linked_longterm_file = Path(cfg.get("LST1", "LONGTERM_DIR")) / f"night_wise/all/DL1_datacheck_{nightdir}.h5"

if not options.simulate and not options.test and shutil.which("sbatch") is not None:
subprocess.run(cmd, check=True)
linked_longterm_file.symlink_to(longterm_datacheck_file)

Check warning on line 530 in src/osa/scripts/closer.py

View check run for this annotation

Codecov / codecov/patch

src/osa/scripts/closer.py#L530

Added line #L530 was not covered by tests
else:
log.debug("Simulate launching scripts")

Expand Down

0 comments on commit 2f4459e

Please sign in to comment.