我发现这样做最干净的方法是将 async 函数包装在 asgiref.sync.async_to_sync 中(来自 asgiref ): from asgiref.sync import async_to_sync from celery.task ...
確定! 回上一頁