无法在 djcelery admin(mongodb 后端)中显示 celery 任务
我的环境由 django、celery 和 mongodb 作为后端组成。
我设法使用 djcelery 管理界面创建定期任务,启动 celerybeat 后我可以看到它运行。这个任务很简单:它只是按照 celery 教程中的建议添加 2 个整数。
我使用以下命令行启动 celeryd
python manage.py celeryd -E -l INFO --settings=settings
celerybeat 使用以下命令行:
python Manage.py celerybeat --settings=设置
最后使用 celerycam 来拍摄我的任务快照:
python Manage.py celerycam --settings=设置
当我尝试在 djcelery admin 中显示 celery 任务时,但我一直收到相同的错误消息,有谁知道如何修复它?
my environment is composed of django, celery and mongodb as a back end.
I managed to create a periodic tasks using djcelery admin interface and after starting celerybeat I can see it runs. This task is simple: it just makes an addition of 2 integers as proposed in celery tutorial.
I launch celeryd with the following command line
python manage.py celeryd -E -l INFO --settings=settings
celerybeat with the following command line:
python manage.py celerybeat --settings=settings
and finally celerycam to take snapshots of my tasks:
python manage.py celerycam --settings=settings
When I try to display celery tasks in djcelery admin however I keep having the same error message, does anyone know how to fix it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
MongoDB 不支持高级日期/时间查找,例如
__day
、__year
、__hour
等,这就是为什么date_hierarchy
事情崩溃了。但是,该错误消息毫无用处。请在 https://github.com/django-nonrel/mongodb-engine 开票/issues/ 带有完整堆栈跟踪的链接(您可以通过单击 Django 错误页面上的“粘贴”按钮来获取该链接)。
可能的解决方法:
date_hierarchy
选项MongoDB does not support advanced date/time lookups like
__day
,__year
,__hour
etc, this is why thedate_hierarchy
thing crashes.However, the error message is pretty useless. Please open a ticket at https://github.com/django-nonrel/mongodb-engine/issues/ with a link to the full stacktrace (you can get that by clicking the "paste" button on the Django error page).
Possible workarounds:
date_hierarchy
option在这个问题中,它指出您应该为djcelery,但尽管我已经配置了这个,但我的管理任务页面是空的(也不例外,但没有填充)。
我使用 mysql 作为任务的存储。
In this question it stated that you should set specific Scheduler for the djcelery, but though I have configured this, my admin tasks page is empty (no exception, but does not get populated).
I'm using mysql as a storage for tasks.