Persistence of DataStructures in Collector class???
Hi All, I am extending the Collector class in CMFCollector. I have added a dictionary data structure inside the Collector class. I am manipulating the dictionary whenever status of a bug changes. For this I have added some scripts inside the CMF_Collector_Work Flow and it works perfectly. I want this data structure to be persistent.. Whats the problem I have now is... the dictionary value gets lost whenever I restart zope. Is there any way to make it persistent without using database or ZODB.???? regards saravanan A ___________________________________________________ Impress your clients! Send mail from me @ mycompany.com . Just Rs.1499/year. Click http://www.rediffmailpro.com to know more.
I am extending the Collector class in CMFCollector. I have added a dictionary data structure inside the Collector class. I am manipulating the dictionary whenever status of a bug changes. For this I have added some scripts inside the CMF_Collector_Work Flow and it works perfectly.
I want this data structure to be persistent.. Whats the problem I have now is... the dictionary value gets lost whenever I restart zope.
Is there any way to make it persistent without using database or ZODB.????
The persistence machinery can't notice changes to dictionary (or list) attributes of persistent objects unless you notify it. You can try http://www.zope.org/Members/AndrewWilcox/PersistentListDict or you can take the more "traditional" approach as in http://www.zope.org/Documentation/Articles/ZODB1 (specifically the _p_changed attribute.) Not coincidentally, these are the top two links under a Google search for 'zope dictionary persistence'. --jcc
participants (2)
-
J Cameron Cooper -
saravanan annamalai