mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-15 09:42:38 -05:00
remove duplication shutdown loggers
also add **kwargs to make it celery4 compatible
This commit is contained in:
@@ -5,7 +5,6 @@ from datetime import (
|
||||
)
|
||||
|
||||
import pytz
|
||||
from celery.signals import worker_process_shutdown
|
||||
from flask import current_app
|
||||
from notifications_utils.statsd_decorators import statsd
|
||||
from sqlalchemy import and_, func
|
||||
@@ -74,11 +73,6 @@ from app.utils import (
|
||||
from app.v2.errors import JobIncompleteError
|
||||
|
||||
|
||||
@worker_process_shutdown.connect
|
||||
def worker_process_shutdown(sender, signal, pid, exitcode):
|
||||
current_app.logger.info('Scheduled tasks worker shutdown: PID: {} Exitcode: {}'.format(pid, exitcode))
|
||||
|
||||
|
||||
@notify_celery.task(name="remove_csv_files")
|
||||
@statsd(namespace="tasks")
|
||||
def remove_csv_files(job_types):
|
||||
|
||||
Reference in New Issue
Block a user