Skip to content

Commit

Permalink
Send an email if autocloser does not finish correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
marialainez committed Jan 17, 2024
1 parent 9b49c55 commit 4551950
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/osa/scripts/closer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from osa.utils.cliopts import closercliparsing
from osa.utils.logging import myLogger
from osa.utils.register import register_found_pattern
from osa.utils.mail import send_warning_mail
from osa.utils.utils import (
night_finished_flag,
is_day_closed,
Expand Down Expand Up @@ -189,6 +190,10 @@ def post_process(seq_tuple):
time.sleep(600)
n += 1

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

View check run for this annotation

Codecov / codecov/patch

src/osa/scripts/closer.py#L190-L191

Added lines #L190 - L191 were not covered by tests

if n > n_max:
send_warning_mail(date=options.date)
return False

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

View check run for this annotation

Codecov / codecov/patch

src/osa/scripts/closer.py#L194-L195

Added lines #L194 - L195 were not covered by tests

if options.seqtoclose is None:
database = cfg.get("database", "path")
if database:
Expand Down

0 comments on commit 4551950

Please sign in to comment.