django中使用celery出现错误

错误:Signal handler <bound method DjangoWorkerFixup.on_task_postrun of <celery.fixups.django.DjangoWorkerFixup object at 0x000002C9D2762940>> raised: DatabaseError("DatabaseWrapper objects created in a thread can only be used in that same thread. The object with alias 'default' was created in thread id 3065822880656 and this is thread id 3065869679472.")

 解决办法:如果你的django版本为3 x 就把他降低2.x的版本

posted @ 2020-05-08 20:01  杨灏  阅读(712)  评论(1编辑  收藏  举报