【发布时间】:2010-08-01 00:36:09
【问题描述】:
我正在创建一个使用 WSGI 服务的地图应用程序,并且每个地图都需要不同的配置文件。目前,我通过以下方式启动服务:
import os, sys
tilecachepath = '/usr/local/lib/python2.6/dist-packages/TileCache-2.10-py2.6.egg/TileCache'
sys.path.append(tilecachepath)
from TileCache.Service import Service, wsgiHandler
from paste.request import parse_formvars
theService = {}
def wsgiApp (environ, start_response):
global theService
fields = parse_formvars(environ)
cfgs = fields['cfg']
theService = Service.load(cfgs)
return wsgiHandler(environ, start_response, theService)
application = wsgiApp
这显然是启动了太多的处理程序!如何确定特定处理程序是否已在运行?我需要调整 apache 配置中的任何内容以使处理程序正确超时?
【问题讨论】:
标签: python apache gis mod-wsgi