Skip to content

Commit

Permalink
avoid creating the flag file if there is no data
Browse files Browse the repository at this point in the history
  • Loading branch information
marialainez committed Aug 8, 2024
1 parent 9ba21dd commit db1f22f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/osa/scripts/gain_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ def check_failed_jobs(date: datetime):
"""Search for failed jobs in the log directory."""

summary_table = run_summary_table(date)

if len(summary_table) == 0:
log.warning(f"No runs are found in the run summary of {date_to_iso(date)}. Nothing to do. Exiting.")
sys.exit(0)

data_runs = summary_table[summary_table["run_type"] == "DATA"]
failed_runs = []
warnings_in_logs = []
Expand Down

0 comments on commit db1f22f

Please sign in to comment.