Skip to content

Commit 09e9371

Browse files
committed
Force autocloser to exit if cron.lock exists
1 parent 28e501a commit 09e9371

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/osa/scripts/autocloser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,22 @@ 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 "
8989
f"for {self.telescope}! Ignoring {self.telescope}"
9090
)
91-
return
91+
sys.exit(0)
9292

9393
self.parse_sequencer()
9494

0 commit comments

Comments
 (0)