Fix incorrect expectation of return type for summary emails in notification cli, and add 1 to days in summary email
This commit is contained in:
parent
9d00464842
commit
787ca4f860
|
@ -85,15 +85,13 @@ def security_expiration_summary(exclude):
|
|||
status = FAILURE_METRIC_STATUS
|
||||
try:
|
||||
print("Starting to notify security team about expiring certificates!")
|
||||
success, failed = send_security_expiration_summary(exclude)
|
||||
status = send_security_expiration_summary(exclude)
|
||||
print(
|
||||
"Finished notifying security team about expiring certificates!"
|
||||
f"Sent: {success} Failed: {failed}"
|
||||
)
|
||||
status = SUCCESS_METRIC_STATUS
|
||||
except Exception:
|
||||
sentry.captureException()
|
||||
|
||||
metrics.send(
|
||||
"security_expiration_notification_job", "counter", 1, metric_tags={"status": status}
|
||||
"security_expiration_summary_notification_job", "counter", 1, metric_tags={"status": status}
|
||||
)
|
||||
|
|
|
@ -77,7 +77,6 @@
|
|||
<tr>
|
||||
<td style="font-family:Roboto-Regular,Helvetica,Arial,sans-serif;font-size:13px;color:#202020;line-height:1.5">
|
||||
<br>This is a summary of all certificates expiring soon.
|
||||
Only certificates matching the configured expiration intervals are included here.
|
||||
Certificates with notifications disabled have been omitted.
|
||||
<table border="0" cellspacing="0" cellpadding="0" style="margin-top:12px;margin-bottom:48px">
|
||||
<tbody>
|
||||
|
@ -87,7 +86,7 @@
|
|||
<td width="16px"></td>
|
||||
<td style="line-height:1.2">
|
||||
<span style="font-family:Roboto-Regular,Helvetica,Arial,sans-serif;font-size:24px;color:#202020">
|
||||
<br>Expiring in {{ interval_and_certs["interval"] }} days<br>
|
||||
<br>Expiring in {{ interval_and_certs["interval"] + 1 }} days<br>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue