Skip to content

Commit

Permalink
Removed log statement
Browse files Browse the repository at this point in the history
  • Loading branch information
k-macmillan committed Nov 29, 2024
1 parent b110a02 commit 4d74fd9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions app/celery/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,12 @@ def filter(self, record):

@task_prerun.connect
def add_id_to_logger(task_id, task, *args, **kwargs):
current_app.logger.info('this is a prerun test!')
request_id = kwargs.get('notification_id', task_id)
current_app.logger.addHandler(CeleryRequestIdFilter(request_id, f'celery-{request_id}'))


@task_postrun.connect
def id_cleanup_logger(task_id, task, *args, **kwargs):
current_app.logger.info('this is a postrun test!')
request_id = kwargs.get('notification_id', task_id)
for handler in current_app.logger.handlers:
if handler.name == f'celery-{request_id}':
Expand Down

0 comments on commit 4d74fd9

Please sign in to comment.