Skip to content

Commit

Permalink
Merge pull request #316 from cta-observatory/sequencer_timeout
Browse files Browse the repository at this point in the history
Fix issue in function "timeout_in_sequencer"
  • Loading branch information
morcuended authored Nov 5, 2024
2 parents 318310c + ac74c5a commit 5133503
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/osa/scripts/sequencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,9 @@ def timeout_in_sequencer(date: datetime.datetime) -> bool:

for run in data_runs["run_id"]:
jobs_run = sacct_info[sacct_info["JobName"]==f"LST1_{run:05d}"]
last_job_id = sorted(jobs_run["JobID"].unique())[-1]
jobs_run = sacct_info[sacct_info["JobID"]==last_job_id]
if len(jobs_run["JobID"].unique())>1:
last_job_id = sorted(jobs_run["JobID"].unique())[-1]
jobs_run = sacct_info[sacct_info["JobID"]==last_job_id]
timeout_jobs = jobs_run[(jobs_run["State"] == "TIMEOUT")]
if len(timeout_jobs) != 0:
return True
Expand Down

0 comments on commit 5133503

Please sign in to comment.