我有一个简单的Python uwsgi的应用程序,下面的基本模式:
def application(env, start_response):
... do something ...
... create some threads ...
... handover the work to the threads ...
start_response('200 OK', [('Content-Type','text/html')])
return result
我的系统是抱怨我的应用程序不处理关机,他必须等待uwsgi的超时每次他想重启uwsgi服务时间终止该应用程序。 其中,显然,可能需要长达30秒的时间在其服务不可用。
是否有一个特定的信号或调用uwsgi发送,当它想将其关闭的应用程序? 我该如何处理这个问题?