Re: Event to receive list of changed and not yet flushed objects
Sean Upton <[email protected]> Wed, 30 May 2018 09:29:47 -0600
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
> On May 30, 2018, at 8:24 AM, [email protected] wrote: > > Is there a mechanism by which one could get a list of changed and not yet flushed objects? > You can poll this from the transaction manager: https://groups.google.com/forum/#!topic/zodb/619id0c-lh8 <https://groups.google.com/forum/#!topic/zodb/619id0c-lh8> > What I'm looking to do, is to hopefully > > 1-Be notified through an event whenever an object is changed ...but you likely want to look into application-level pub-sub solutions. Or use synchronous event system like zope.event. > 2-Get the list of changed objects See above. > 3-Determine whether the number/size of changed objects justifies creating a savepoint to flush the objects from memory Often this is application-specific, given the nature of what you are choosing to persist. It might be hard to craft a generic solution introspecting the transaction manager and connection, unless your objects are all very similar in size. Sean -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.