liiight / notifiers

The easy way to send notifications
http://notifiers.readthedocs.io/
MIT License
2.66k stars 107 forks source link

Implement rate limiting #86

Open liiight opened 6 years ago

desprit commented 3 years ago

Yeah, rate limiting would be great. As an alternative, does anyone have an example of how to intercept log events? I could have some simple function to check the last time log message was sent and define whether it is time to send another one or not.

liiight commented 3 years ago

Well, if you're not sending async notifications, there are a number of method to apply rate limits, such as these packages:

https://pypi.org/project/ratelimiter/ https://pypi.org/project/ratelimit/

I envisioned to apply this via a custom requests Session. This is pretty low priority though, and I'll probably never implement this myself :)