On 04/29/2010 11:41 AM, Chris Withers wrote: > Chris McDonough wrote: >> You could do: >> >> def app(global_config, **settings): >> config = Configurator(settings=settings) >> config.begin() >> config.registry.provideUtility(factory(), ISomething) >> config.scan() >> config.end() >> return config.make_wsgi_app() >> >>> ...or do I have to do something to make sure I register in the right >>> registry? >> >> During the configuration stage, the "current" global registry is >> defined as whatever registry is attached to the configurator between >> the begin() and end() calls. > > <clueless alert> > > In a wsgi app, is the app function above executed once per process or > once per thread?
Once per process. >> Preferably, don't do that at all, and you'll wind up putting >> registrations into the Zope global registry, which your app can use >> independently. > > ...right, but if I do that configuration inside app(), and it gets > executed once per thread, won't I be re-doing the global registrations > unnecessarilly? (I don't know if that has bad consequences...) It doesnt. - C _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev