mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Seperate deletion of jobs:
* Two separate jobs, one for sms&email and another for letter * Change celery task for delete to accept template type filter * General refacor of tests to make more readable
This commit is contained in:
@@ -32,8 +32,8 @@ from app.config import QueueNames
|
||||
|
||||
@notify_celery.task(name="remove_csv_files")
|
||||
@statsd(namespace="tasks")
|
||||
def remove_csv_files():
|
||||
jobs = dao_get_jobs_older_than_limited_by()
|
||||
def remove_csv_files(job_types):
|
||||
jobs = dao_get_jobs_older_than_limited_by(job_types=job_types)
|
||||
for job in jobs:
|
||||
s3.remove_job_from_s3(job.service_id, job.id)
|
||||
current_app.logger.info("Job ID {} has been removed from s3.".format(job.id))
|
||||
|
||||
Reference in New Issue
Block a user