简体   繁体   中英

How to use Async Task in django 1.10 to run in background?

I am looking for an option to use in my Django 1.10 web project where I need to run some task every hour. I know I can use DJCELERY but it is not updated for Django 1.10 and I am getting these errors,

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

So is there any other option that I can use to run task(s) in background? Does django offer anything like this in new version?

Thank you.

You can use Celery 4, which doesn't require django-celery and is compatible with Django 1.10. Read the Celery Documentation to see how it's integrated with Django.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM