开发者

django app that runs constantly in the backend

hey guys, im trying to run a script in the backend of my django project, i have used django signals to call my script and run it when foo class is saved, and in the foo class theres a variable that can be true or false, if its true it calls an infinte loop that runs a function every x seconds, but since this is an infinite loop, its keeping th开发者_C百科e django HTTPRequest active, so the page never finishes loading, is there a way to bipass this behavior ?


If you want to run tasks asynchronously have a look at django-celery!

EDIT: of course you can also set up a good old cron job on your system....

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜