1
分叉後我需要關閉pserve
/waitress
進程,但我無法獲取對它的引用,因此我可以關閉它。通常,在金字塔__init__.py
我做的:在金字塔處理WSGI應用程序
def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
...
config = Configurator(settings=settings,
authentication_policy=authn_policy,
authorization_policy=authz_policy,
root_factory=Root)
config.scan()
return config.make_wsgi_app()
但是,我不能存儲與WSGI應用某處的變量,因爲它在應用程序的意見globals()
不可見等
我怎樣才能得到一個處理它或至少關閉它另一種方式?
你想解決什麼問題? –