Skip to content

Commit

Permalink
add back message
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai committed Dec 2, 2024
1 parent 1126457 commit 8ad076b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/notifications/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ def check_sms_annual_limit(service: Service, requested_sms=0):


def send_warning_email_limit_emails_if_needed(service: Service) -> None:
"""
Function that decides if we should send email warnings about nearing or reaching the email daily limit.
"""
todays_current_email_count = fetch_todays_email_count(service.id)
bool_nearing_email_daily_limit = todays_current_email_count >= NEAR_DAILY_LIMIT_PERCENTAGE * service.message_limit
bool_at_or_over_email_daily_limit = todays_current_email_count >= service.message_limit
Expand Down

0 comments on commit 8ad076b

Please sign in to comment.