mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-05 08:40:29 -04:00
Updates after review
- Modified the services_dao to return an int instead of a datetime to make usage easier and removed the BST function on year as it is not relevant for year - Improved tests do there is less logic by ordering the result so there is less reliance on the template id - Renamed variable in stats_template_usage_by_month_dao.py to make it consistent with the method
This commit is contained in:
@@ -410,13 +410,13 @@ def check_job_status():
|
||||
|
||||
@notify_celery.task(name='daily-stats-template_usage_by_month')
|
||||
@statsd(namespace="tasks")
|
||||
def daily_stats_template_usage_my_month():
|
||||
def daily_stats_template_usage_by_month():
|
||||
results = dao_fetch_monthly_historical_stats_by_template()
|
||||
|
||||
for result in results:
|
||||
insert_or_update_stats_for_template(
|
||||
result.template_id,
|
||||
result.month.month,
|
||||
result.year.year,
|
||||
result.month,
|
||||
result.year,
|
||||
result.count
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user