Access all active sessions for Pyramid Beaker

Access all active sessions for Pyramid Beaker

Postby dbpython » Tue Jan 14, 2014 8:10 pm

I am new to Python, so please bear with me.

I am currently working on a project that acts as a middle ware which requires active user sessions to be periodically refreshed on the upstream system. I have no control over the upstream system other than to make some requests to it. One of the requirements is to allow users to be inactive on our system for a longer period of time than they are allowed to be inactive on the upstream system. In order to do this I need to periodically send a keep alive request to the upstream system. What I am trying to figure out is how this can be done.

The simplest way I can think of is to iterate through all active sessions, which are handled by pyramid_beaker, and send the keep alive request based on the upstream's session id stored in each of the sessions. If it is not possible to directly get a collection of all of the sessions is there a way to monitor the creation and destruction of sessions? Are either of those two options possible? If not, any pointers to another way this can be accomplished?
Last edited by stranac on Tue Jan 14, 2014 8:17 pm, edited 1 time in total.
Reason: First post lock.
dbpython
 
Posts: 1
Joined: Tue Jan 14, 2014 7:55 pm

Return to Web Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron