Closed
Description
When I was testing the task of sending an email, an exception occurred:
@celery_app.task
def send_active_email(email: str, active_url: str) -> str:
send_verification_code_email(to=email, active_url=active_url)
print(f'发送激活邮件到 {email} 成功')
return 'Success'
KeyError: 'backend.app.tasks.send_active_email'
Request interface: /api/v1/mixes/tests/send
KeyError: 'backend.app.tasks.task_demo_async'
Received unregistered task of type 'backend.app.tasks.task_demo_async'.
The message has been ignored and discarded.
Did you remember to import the module containing this task?
Or maybe you're using relative imports?
Please see
https://docs.celeryq.dev/en/latest/internals/protocol.html
for more information.
Metadata
Metadata
Assignees
Labels
No labels