Depending on how you have have configured Apache/mod_wsgi do note that you can end up with a multi process configuration and each process will not share the same global variable. Read:
http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading about issues related to process/thread models and data sharing between processes. Also not that if using embedded mode Apache can shutdown and restart processes at its whim. Thus, daemon mode is the most predictable and controllable as far as ensuring processes stay persistent and that you control how many processes are running. Graham On 10 May 2011 15:09, Gnarlodious <[email protected]> wrote: > HA! It is working! > > I wrote a script like this: > > class test(object): > def __init__(self): > self.runs=1 > def __call__(self, environ, start_response): > self.runs+=1 > start_response('200 OK', [ ('Content-type', 'text/plain') ]) > return str(self.runs) > > application = test() > > > This verifies the number of runs is remembered between calls. Now I am > happy and can get busy scripting. > > -- Gnarlie > http://Sectrum.com > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
