mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-13 16:52:23 -05:00
add task and command
This commit is contained in:
@@ -18,7 +18,10 @@ from sqlalchemy.orm.exc import NoResultFound
|
||||
from app import db, redis_store
|
||||
from app.aws import s3
|
||||
from app.celery.nightly_tasks import cleanup_unfinished_jobs
|
||||
from app.celery.tasks import process_row
|
||||
from app.celery.tasks import (
|
||||
generate_notification_reports_task,
|
||||
process_row,
|
||||
)
|
||||
from app.dao.annual_billing_dao import (
|
||||
dao_create_or_update_annual_billing_for_year,
|
||||
set_default_free_allowance_for_service,
|
||||
@@ -810,6 +813,11 @@ def update_templates():
|
||||
_clear_templates_from_cache()
|
||||
|
||||
|
||||
@notify_command(name="generate-notification-reports")
|
||||
def generate_notification_reports():
|
||||
generate_notification_reports_task()
|
||||
|
||||
|
||||
def _clear_templates_from_cache():
|
||||
# When we update-templates in the db, we need to make sure to delete them
|
||||
# from redis, otherwise the old versions will stick around forever.
|
||||
|
||||
Reference in New Issue
Block a user