Open j3k0 opened 7 years ago
Are you sure? If I remember correctly, LP just stores label
-> [Function]
mappings. Functions is a pair to be invoked: one for timeout (managed within LP class), one when triggered with #trigger(label)
.
From there, Redis listener has a chance to trigger it before timeout happens https://github.com/j3k0/ganomede-notifications/blob/master/src/notifications-api/index.coffee#L56
On the other hand, I just noticed there might be a bug with pub sub client itself, so don't close this one just yet.
Okay, I actually didn't even looked into the code and believed Leon about that... So it still was worth double checking.
I just noticed there might be a bug with pub sub client itself
Wish I wrote down what that was…
long-poll.coffee
apparently only works in the context where a single instance of ganomede-notification is running. ganomede-events' should have improved this by relying on redis' pub-sub mechanism. Check if that's worth integrating in here.