You can hack around this by setting tools.sessions.clean_thread = True,
but it should probably have a more public way to do it. Care to open a
ticket?
Robert Brewer
fuma...@aminus.org
With review, yes.
> Is there some possibility to periodically call some function/method
> for session cleanup (and to use wget to call this script every hour or
> something)?
That would be the clean_up thread which you just asked to remove. ;)
CherryPy was designed to work in environments where starting new threads
is allowed. If you're working in one where it isn't, then the only other
solution would be to rework cherrypy.engine to perform periodic tasks in
the main thread during its "wait" method. You can subclass
cherrypy.wspbus.Bus (overriding "wait") and give that a try. However,
keep in mind that the "wait" method is designed to be called for
purposes other than blocking the main thread--so perhaps "wait" needs to
change to wait(self, state, interval=0.1, callable=None), where
"callable" is a function to be called at each interval (i.e. every time
the sleep loop wakes up). Since the Bus is already a pub/sub engine,
maybe that should be wait(self, state, interval,
channel='main_thread_events'), and any code could subscribe a listener
to that channel.
Robert Brewer
fuma...@aminus.org
Ah. I wasn't aware GAE allowed you to run other processes.
FileSession.clean_up is all the code you need to run to clean out
file-based sessions.
Robert Brewer
fuma...@aminus.org