我正在寻找一个在我的Django 1.10 web项目中使用的选项,我需要每小时运行一些任务。我知道我可以使用DJCELERY,但它没有更新Django 1.10,我收到这些错误,
Error fetching command 'celerymon': type object 'BaseCommand' has no attribute 'option_list'
Command 'celerymon' skipped
Error fetching command 'celerybeat': type object 'BaseCommand' has no attribute 'option_list'
Command 'celerybeat' skipped
Error fetching command 'celeryd_multi': type object 'BaseCommand' has no attribute 'option_list'
Command 'celeryd_multi' skipped
Error fetching command 'celeryd': type object 'BaseCommand' has no attribute 'option_list'
Command 'celeryd' skipped
Error fetching command 'celerycam': type object 'BaseCommand' has no attribute 'option_list'
Command 'celerycam' skipped
Error fetching command 'celery': type object 'BaseCommand' has no attribute 'option_list'
Command 'celery' skipped
Error fetching command 'celeryd_detach': type object 'BaseCommand' has no attribute 'option_list'
Command 'celeryd_detach' skipped
Error fetching command 'djcelerymon': type object 'BaseCommand' has no attribute 'option_list'
Command 'djcelerymon' skipped
那么我可以用任何其他选项在后台运行任务吗? django会在新版本中提供这样的东西吗?
谢谢。
答案 0 :(得分:3)
您可以使用Celery 4,它不需要django-celery并且与Django 1.10兼容。阅读Celery Documentation以了解它如何与Django集成。