[sqlalchemy] Re: Expire Objects from other Thread

2007-12-01 Thread Michael Bayer
On Dec 1, 2007, at 9:33 AM, Koen Bok wrote: This is quite hackish, but just an experiment for me. We use listen/notify in our app. A seperate thread is listening for notifications from updated rows in the table. If one is received I'd like to expire an object in the Session cache so it

[sqlalchemy] Re: Expire Objects from other Thread

2007-12-01 Thread Koen Bok
Cool, thanks! I got it working pretty wel I think. I replaced the iterator code with a Session.get. Check out the code here: http://paste.pocoo.org/show/13434/ The only thing I am still wondering if Session.get also returns objects in Session.new? Otherwise this won't fix the other bug. I think