Files
notifications-api/app/performance_platform/total_sent_notifications.py
Steven Reilly ff4190a8eb Remove letters-related code (#175)
This deletes a big ol' chunk of code related to letters. It's not everything—there are still a few things that might be tied to sms/email—but it's the the heart of letters function. SMS and email function should be untouched by this.

Areas affected:

- Things obviously about letters
- PDF tasks, used for precompiling letters
- Virus scanning, used for those PDFs
- FTP, used to send letters to the printer
- Postage stuff
2023-03-02 20:20:31 -05:00

29 lines
932 B
Python

from app import performance_platform_client
from app.dao.fact_notification_status_dao import (
get_total_sent_notifications_for_day_and_type,
)
# TODO: is this obsolete? it doesn't seem to be used anywhere
def send_total_notifications_sent_for_day_stats(start_time, notification_type, count):
payload = performance_platform_client.format_payload(
dataset='notifications',
start_time=start_time,
group_name='channel',
group_value=notification_type,
count=count
)
performance_platform_client.send_stats_to_performance_platform(payload)
# TODO: is this obsolete? it doesn't seem to be used anywhere
def get_total_sent_notifications_for_day(day):
email_count = get_total_sent_notifications_for_day_and_type(day, 'email')
sms_count = get_total_sent_notifications_for_day_and_type(day, 'sms')
return {
"email": email_count,
"sms": sms_count,
}