阅读背景:

一旦服务器完成初始化,如何在Django中运行启动代码?

来源:互联网 

I would like to create a thread (maybe in the future a process) that inherits all the django env and settings but goes off to do its own monitoring. Ideally I would like this to be triggered when the Django server is done initializing. I've tried both methods below. The first one seems to run the Middleware initializer every time a request is made and both of them have the problem that my startup code only gets triggered when the first request to the server is made.I would like to create a thread (maybe in the f




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: