[Twisted-Python] spawn wsgi resource into separate process

Yaroslav Fedevych jaroslaw.fedewicz at gmail.com
Sat Aug 28 17:49:52 EDT 2010

On Sat, Aug 28, 2010 at 9:37 PM, Thomas Johnson <tomfmason at gmail.com> wrote:
> In the following code I am attempting to host several django applications in vhosts - http://pastie.org/1122806 . This code works fine if I only need one settings module. In my case each vhost needs it's own(lines 32-38) DJANGO_SETTINGS_MODULE environment variable. It appears that I need to use reactor.spawnProcess to spawn a new process with the required environment variable.

I have run into a similar problem before. But did you know that any
dict to be treated as the environment can be passed as the first
argument to WSGIHandler()? That's exactly what helped me.

Engineer : How do I do it?
Economist : How much will it cost?
Twisted Developer: But does it block?

More information about the Twisted-Python mailing list