Hi Michael, Thanks for the reply, but even if I remove ZTE in my models.py --
DBSession = scoped_session(sessionmaker()) Everything is still wrapped in one big transaction -- -> for item in items_query.all(): (Pdb) 2011-05-13 08:23:54,109 INFO sqlalchemy.engine.base.Engine.0x...68cc BEGIN (implicit) 2011-05-13 08:23:54,122 INFO sqlalchemy.engine.base.Engine.0x...68cc SELECT ... If I have 2 million items it's not going to be a robust design to commit only once in the end after updating 1 million of them. Is there a way to explicitly turn off the transaction (at least for SELECT)? Jerry On May 12, 11:27 pm, Michael Merickel <[email protected]> wrote: > Nothing is stopping you from defining another session object bound to the > same engine that does not use the ZTE. As long as your engine is accessible > through the settings/registry then it shouldn't be an issue to create a > session in your script and use it only there. > > Michael > > On Thu, May 12, 2011 at 1:37 AM, jerry <[email protected]> wrote: > > It seems transaction based SQLAlchemy session is defined by the > > ZopeTransactionExtension -- > > > DBSession = > > scoped_session(sessionmaker(extension=ZopeTransactionExtension())) > > > This is causing problem with my long-running/large-volume paster > > command, which are not suitable for transactions. But I couldn't get > > the DBSession redefined no matter how I fiddle with the paster command > > source. Is there a way to temporarily turn off transaction in a > > Pyramid project? > > > Thanks in advance! > > > Jerry > > > -- > > You received this message because you are subscribed to the Google Groups > > "pylons-discuss" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/pylons-discuss?hl=en. > > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
