From: Howard, R. <roc...@am...> - 2005-08-12 21:06:45
|
=20 Just to add a bit of closure to this thread, here is the enhancement that I implemented: 1) Added a config variable to spyceconf.py named readyFunc initilized to None # The readyFunc is an optional function that is run once at the # moment that the server is ready to begin processing requests. # (Note that it will be called again if a server reload occurs.) readyFunc =3D None 2) Modified spyceWWW.py to call this function if it is not None. # process requests print '# Ready.' if server.config.readyFunc !=3D None: server.config.readyFunc() (The first two lines were already in the code. I added the next two.) One of my servers defines no readyFunc. It works fine. Another server has added code in its' config file that imports a module that defines a function with no arguments named myReadyFunc and then sets readyFunc equal to myReadFunc. This function does a number of useful chores such as calling setuid and also setting some environment variables. It works fine too. Rock |