Skip to content

Commit 22378e7

Browse files
authored
Merge pull request #345 from cta-observatory/exit-closer
Force autocloser to exit if cron.lock exists
2 parents 13da377 + 8f201b5 commit 22378e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/osa/scripts/autocloser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ def __init__(
7373

7474
if self.is_closed():
7575
log.info(f"{self.telescope} is already closed! Ignoring {self.telescope}")
76-
return
76+
sys.exit(0)
7777
if not analysis_path(self.telescope).exists():
7878
log.warning(
7979
f"Analysis directory does not exist for {self.telescope}! "
8080
f"Ignoring {self.telescope}"
8181
)
82-
return
82+
sys.exit(0)
8383
if not self.lock_automatic_sequencer() and not ignore_cronlock:
8484
log.warning(f"{self.telescope} already locked! Ignoring {self.telescope}")
85-
return
85+
sys.exit(0)
8686
if not self.simulate_sequencer(date, config_file, test, no_gainsel):
8787
log.warning(
8888
f"Simulation of the sequencer failed "

0 commit comments

Comments
 (0)