[ZODB-Dev] when to use connection close/sync

Jim Fulton jim at zope.com
Fri Aug 16 15:53:56 CEST 2013


On Fri, Aug 16, 2013 at 9:38 AM, Joerg Baach <lists at baach.de> wrote:
> Hi *,
>
> after having looked around on google and the zodb api documentation[1] I
> am still unsure how to handle connections properly (especially in the
> context of syncing zeo clients):
>
> When do I need to:
>
> - connection.close()

When you're done using a connection. :)

> - connection.sync()

Never.  This is obsolete.

I suspect you aren't asking the right question.

I'm gonna guess you're asking:

"What do I need to do to see database updates (made by other
clients/connections)?"

The answer to that question is:

To see database changes, you need to start a new transaction.

You always see data as of the time the current transaction started.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton


More information about the ZODB-Dev mailing list