mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-28 21:41:45 -05:00
add command to backfill template usage
The command takes a service id and a day, grabs the historical data for that day (potentially out of notification_history), and pops it in redis (for eight days, same as if it were written to manually). also, prefix template usage key with "service" to make clear that it's a service id, and not an individual template id.
This commit is contained in:
@@ -80,7 +80,7 @@ def cache_key_for_service_template_counter(service_id, limit_days=7):
|
||||
|
||||
|
||||
def cache_key_for_service_template_usage_per_day(service_id, datetime):
|
||||
return "{}-template-usage-{}".format(service_id, datetime.date().isoformat())
|
||||
return "service-{}-template-usage-{}".format(service_id, datetime.date().isoformat())
|
||||
|
||||
|
||||
def get_public_notify_type_text(notify_type, plural=False):
|
||||
|
||||
Reference in New Issue
Block a user