On May 03, 2012, at 02:04 AM, George Chatzisofroniou wrote: >Interface to the MM core > >The app needs to interact with the Mailman core. I think the best idea >is to implement a message bus that will send a notification every time >a message is sent (the same way an archiver works). Based on this >notification -which will carry the information about the sent message- >the app will be ready to update the counts. > >Although, in some cases (eg the app is installed after an existing >archive or there was an unexpected crash), the message bus should >deliver (triggered by a button) more than one notifications (for the >whole archive) to the app in order to initialize/recover the metrics. >In those cases, the models will be initialized and the generation of >the metrics will start over.
Do you know exactly what kind of information you need? The suggestion to use the IArchiver interface is convenient, but might not tell you much other than who posted what to which list on what date. It won't tell you things like the number of recipients, how long that message took to deliver, if there were any failures, etc. The core does know this, and in fact logs it, but all you get at the IArchiver interface is the posted message. It would certainly be possible to hook in a zope.event notification with those metrics for each successfully posted message. From there, a plugin could register a subscriber that put the event data on a message bus. Or you could grep the logs. :) Anyway, I think it would be useful to improve the support for this in the core. Cheers, -Barry _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9