0
dev env
django = 3.2.4
celery = 5.2.3
redis

I use Celery to asynchronously process. I'm using it for email transmission and AI Inference functions, but @sharedtask applied to email works well without any problems. However, the AI Inference function is different. Once successful and then the same action is performed, the 'Not registered' Exception is displayed. Why does this happen? The success and failure of the same task are shown below.

enter image description here

bryantjo
  • 1
  • 1

1 Answers1

0

I guess that your worker is not familiar with the call_ai_engine_api_task.

There are several ways to do that, for example:

app = Celery("my_app", broker=..., backend=..., include=["path.to.call_ai_engine_api_task", ..])  

or with this technique.

You can then see the list of registered tasks in worker startup logs.

ItayB
  • 10,377
  • 9
  • 50
  • 77