mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
Removed the 'delete job' tasks from the tasks.py file
- this was called after processing a job. - now to be called on a schedule.
This commit is contained in:
@@ -101,20 +101,11 @@ def process_job(job_id):
|
||||
job.processing_started = start
|
||||
job.processing_finished = finished
|
||||
dao_update_job(job)
|
||||
remove_job.apply_async((str(job_id),), queue='remove-job')
|
||||
current_app.logger.info(
|
||||
"Job {} created at {} started at {} finished at {}".format(job_id, job.created_at, start, finished)
|
||||
)
|
||||
|
||||
|
||||
@notify_celery.task(name="remove-job")
|
||||
@statsd(namespace="tasks")
|
||||
def remove_job(job_id):
|
||||
job = dao_get_job_by_id(job_id)
|
||||
s3.remove_job_from_s3(job.service.id, str(job_id))
|
||||
current_app.logger.info("Job {} has been removed from s3.".format(job_id))
|
||||
|
||||
|
||||
@notify_celery.task(bind=True, name="send-sms", max_retries=5, default_retry_delay=300)
|
||||
@statsd(namespace="tasks")
|
||||
def send_sms(self,
|
||||
|
||||
Reference in New Issue
Block a user