Nginx上的烧瓶线程

时间:2020-07-09 13:17:54

标签: multithreading nginx flask server uwsgi

我正在尝试在开发模式下使用backgroundthread。我正在使用带有uwsgi的Nginx服务器。 在启动应用程序之前,我创建如下线程:

checkTimeOutThread = threading.Thread(target=checkTimeOut)
checkTimeOutThread.daemon = True
checkTimeOutThread.start()

和被调用的函数如下:

while True:
 * Bla bla bla
 time.sleep(10)

在生产模式下,这可行! 但是在开发模式下,服务器无法正确处理请求。例如,客户端收到空消息。

任何帮助都会很棒!

0 个答案:

没有答案