Throttle / Debounce your tasks / operations, group them together!
https://github.com/princemaple/together
-
group notifications to be sent in one email
- cancel the previously queued email if another event happens within a short period (type: debounce / throttle)
-
make heavy operations happen less often, i.e. refresh some global statistics
- allow only 1 operation per certain period (type: throttle)
-
protect some write api
- additonally you can choose to use the first value in a period (keep: first)
- or the last value in the period (keep: last)
Designed to work both on a single node and across nodes in a cluster
Checkout the repo README and the docs for more information