Can I have some code constantly run inside Django like a daemon

前端 未结 3 787
遥遥无期
遥遥无期 2021-02-04 05:10

I\'m using mod_wsgi to serve a django site through Apache. I also have some Python code that runs as a background process (dameon?). It keeps polling a server and inserts data i

3条回答
  •  长发绾君心
    2021-02-04 06:02

    I previously used a cron job but I telling you, you will switch to celery after a while.

    Celery is the way to go. Plus you can tasked long async process so you can speed up the request/response time.

提交回复
热议问题