Skip to content

Commit

Permalink
bin script updated
Browse files Browse the repository at this point in the history
  • Loading branch information
abachleda-baca committed Nov 4, 2024
1 parent a7db3d0 commit d4e2b19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
pip install pipenv
pipenv install
- name: execute certificate expiry undeliverable report run
- name: Execute certificate expiry undeliverable report run
run: pipenv run python3 -m bin.report_certificate_expiry_undeliverable --test agnieszka.bachleda@digital.justice.gov.uk
env:
NOTIFY_PROD_API_KEY: ${{ secrets.NOTIFY_PROD_API_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions bin/report_certificate_expiry_undeliverable.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main(testrun: bool = False, test_email: str = ""):

print("Building undelivered email report...")
undelivered_email_report = notify_service.check_for_undelivered_emails_for_template(
cert_config[ "CERT_EXPIRY_TEMPALATE_ID"])
cert_config["CERT_EXPIRY_TEMPALATE_ID"])

if len(undelivered_email_report) == 0:
print("No undeliverable emails found, nice!")
Expand All @@ -47,14 +47,14 @@ def main(testrun: bool = False, test_email: str = ""):
report = notify_service.build_undeliverable_email_report_string_crs(
undelivered_email_report)
print(f"Sending test undelivered email test report to {test_email}...")
notify_service.send_report_email(
notify_service.send_report_email_crs(
report, cert_config['CERT_UNDELIVERED_REPORT_TEMPALATE_ID'], test_email)
else:
logger.info("Building undelivered email live report...")
report = notify_service.build_undeliverable_email_report_string_crs(
undelivered_email_report)
print("Sending live undelivered emailreport to Operations Engineering...")
notify_service.send_report_email(
notify_service.send_report_email_crs(
report, cert_config["CERT_UNDELIVERED_REPORT_TEMPALATE_ID"], cert_config["CERT_REPLY_EMAIL"])


Expand Down

0 comments on commit d4e2b19

Please sign in to comment.