On 06/10/2014 08:09 AM, Joe Steeve wrote:
Hello all,
I am implementing a CSV exporter to export the objects in a container. I
decided to write it as an 'app_iter' so that I dont have to store an
intermediate file. In the process, I figured that the ZODB connection
gets closed before the app_iter gets called (and making my ZODB object
references stale).
How can I open another ZODB connection, without hooking up with the
current transaction and use it in the app_iter? Or is there any better
way? Thanks in advance.
Joe
You might be able to use the "get_connection()" mechanism from
pyramid_zodbconn. But in reality it's going to be dicey, because the
app_iter may be processed outside the thread that handled the HTTP
request. Personally I'd need several hours to figure out how to do it,
and even then I might only figure out how to do it for a certain server
configuration.
- C
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.