jcurry
2013-10-24 11:05:14 UTC
jcurry [http://community.zenoss.org/people/jcurry] created the discussion
"What does @transact around a function actually do?"
To view the discussion, visit: http://community.zenoss.org/message/75052#75052
--------------------------------------------------------------
We are seeing more examples in code and also in event transforms ( see the class transform on /Status/Perf) of functions that are preceded by @transact .
What does this really do?
I am guessing that it locks the Zope database while it runs code that modifies the database?
Examples I have found do not have a commit() - is this not needed if it is a @transact?
If it locks the database, presumably we should make such functions as short / fast as possible?
Any explanation and guidance gratefully received.
Cheers,
Jane
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/75052#75052]
Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
"What does @transact around a function actually do?"
To view the discussion, visit: http://community.zenoss.org/message/75052#75052
--------------------------------------------------------------
We are seeing more examples in code and also in event transforms ( see the class transform on /Status/Perf) of functions that are preceded by @transact .
What does this really do?
I am guessing that it locks the Zope database while it runs code that modifies the database?
Examples I have found do not have a commit() - is this not needed if it is a @transact?
If it locks the database, presumably we should make such functions as short / fast as possible?
Any explanation and guidance gratefully received.
Cheers,
Jane
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/75052#75052]
Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]