[kgb-maintainers] Detecting "shadow" notifications
Martín Ferrari
martin.ferrari at gmail.com
Tue Oct 13 14:00:10 UTC 2009
Hi Dam,
On Tue, Oct 13, 2009 at 10:11, Damyan Ivanov <dmn at debian.org> wrote:
> This has happened once and it is confusing/annoying, so here's
> a proposal for avoiding "shadow" notifications.
> My idea is that servers track notifications as they see them on IRC.
> For example the last 10 notifications or the notifications from the
> last minute (or both: last minute, but no more than 10).
> 1) there is still chance for doubles, becayse IRC is asynchronous.
I think you can ignore this situation...
> 2) "revision"+repo-id is something that identifies the commit
How about generating the message and a hash of it (say the first 100
chars in the first line) , and then just looking if that hash has been
seen on the channel lately?
> 3) The harderst (for me) part: keeping track. POE is such a worm box
> that I am not sure where the array/hash/whatever with last
> notifications shall be kept and how to access that both from the
> IRC part and the part that handles SOAP requests. Hm, perhaps it
> only needs to be kept in the IRC part, but still needs to be
> accessed by the sub that "listens" in the IRC channell and the one
> that talks to it.
Not that hard, you use $_[HEAP] for global storage, and for recording
you subscribe to some event (I don't remember the name, but it's
already provided by the IRC PoCo)
--
Martín Ferrari
More information about the kgb-maintainers
mailing list