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 gets refetched the
next time it is accessed. I have it working, but I get a lot of these:

AttributeError: 'ReceiveRequest' object has no attribute
'_instance_key'

I guess that's because the background thread is marking objects as
expired while the main thread is performing actions on them.

Is there a way to make this work? Or is it not a good idea at all?

Some example code of my implementation: http://paste.pocoo.org/show/13402/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to