mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
remove duplication shutdown loggers
also add **kwargs to make it celery4 compatible
This commit is contained in:
@@ -2,9 +2,7 @@ import json
|
||||
from datetime import datetime
|
||||
from collections import namedtuple, defaultdict
|
||||
|
||||
from celery.signals import worker_process_shutdown
|
||||
from flask import current_app
|
||||
|
||||
from notifications_utils.recipients import (
|
||||
RecipientCSV
|
||||
)
|
||||
@@ -74,11 +72,6 @@ from app.service.utils import service_allowed_to_send_to
|
||||
from app.utils import convert_utc_to_bst
|
||||
|
||||
|
||||
@worker_process_shutdown.connect
|
||||
def worker_process_shutdown(sender, signal, pid, exitcode):
|
||||
current_app.logger.info('Tasks worker shutdown: PID: {} Exitcode: {}'.format(pid, exitcode))
|
||||
|
||||
|
||||
@notify_celery.task(name="process-job")
|
||||
@statsd(namespace="tasks")
|
||||
def process_job(job_id):
|
||||
|
||||
Reference in New Issue
Block a user