Newrelic runs in sync context while celery tasks are submitted async

Viewed 27

I am trying to wrap celery tasks using newrelic for monitoring but it fails with following error:

File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 31, in inner
    raise SynchronousOnlyOperation(message)
django.core.exceptions.SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async.
0 Answers
Related