On Mon, Jan 10, 2011 at 11:50 AM, Laurent Guyon <[email protected]>wrote:
> Hi, > > > Le vendredi 07 janvier 2011 à 20:34 +0100, nap a écrit : > > > I think I found what make this : the sched_id is missing in the > > properties dict of Notification. > > > > Add this : > > > > 'sched_id' : IntegerProp(default=0), > > > > And it should be ok I think. I'll patch it. > > > > Thx for correcting this (even if I don't understand why adding > 'sched_id' in the properties dict of Notification solved the problem > with enqueing/dequeing in multiprocessing.Queue. Does this Queue uses > this properties dict ?) > In fact __setstate__ and __getstate__ functions use this dict, and they are the function called by the pickle pass, so every time you pass an object from a process to another. If you don't defined them, it take all dict, so there is no problem. But here we do not want some properties to be send, because they are useless, liek the ".ref" that is the host or the service that got this item. > > A problem still remains (with the last git code), my scheduler crashes > when it receives the return from reactionner (in put_results() of > scheduler.py). > > Same logic, adding the 'check_time' attribute to the Notification > properties dict solved the problem : > > notification.py > > 94a95 > > 'check_time' : IntegerProp(default=0), > > All seems working now here. > Yep, should be the same thing. I'm committing it. > > > Btw, didn't you like my little worker.py patch to add exception > catching, in my precedent mail ? > In fact there is a catch when htere is a missing property like it, and it's not a running bug that can happened, and so be catched, but it's a true bug because of a nasty developer (me :) ). So we should not catch it, and crash early. If we pass it, we won't see it and it's even more dangerous that "just a crash". Jean > > > Regards, > > Laurent > > > > > ------------------------------------------------------------------------------ > Gaining the trust of online customers is vital for the success of any > company > that requires sensitive data to be transmitted over the Web. Learn how to > best implement a security strategy that keeps consumers' information secure > and instills the confidence they need to proceed with transactions. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Shinken-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/shinken-devel >
------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ Shinken-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shinken-devel
