ssbc / ssb-replication-scheduler

Plugin to trigger replication of feeds identified as friendly in the social graph
8 stars 1 forks source link

Document debouncePeriod #13

Closed Powersource closed 2 years ago

staltz commented 2 years ago

This is an internal config, exposed in the ssb config object just to make it easier for tests, so we don't need a README documentation, but if you want, you can add some code comments. It basically controls how often will we trigger ssb.ebt.request() calls. We trigger those when the requestManager.add() has "calmed down", i.e. after debouncePeriod milliseconds have passed in which add() was not called.

staltz commented 2 years ago

A timeline of what debounce looks like, assuming 100ms of debouncePeriod:

                   |---100ms---|
-----o-----o---o---o----------------->

-------------------------------o----->
Powersource commented 2 years ago

documented in 8abaeee4311a74b6592e25171854a9f15e77483d now