开发者

Django and services

I'm building a simple website with django that requires constant monitoring of text-based data from another website, that's the way it have to be.

How could I run this service on my web-host using django? would I have to start a separate app and run it via SSH, so it updates the database used b开发者_Go百科y django, or are there any easier/better way?


You could use celery to schedule a job that would read data from that other website and do whatever you want with it.


As an alternative to celery, you could also create a cron job that executes a custom django-admin command. That would give you full access to your django install and ORM. The downside is that cron's smallest time resolution is 1 minute, so if you need it to be real-time, you're not going to be able to do that.

If you do need realtime, then creating a python daemon might be a better option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜