feature: allow sweeping of inactive request buckets

This commit is contained in:
Amish Shah
2018-05-02 17:57:48 +01:00
parent 745669a7c9
commit b5f37728a7
5 changed files with 35 additions and 13 deletions

View File

@@ -26,6 +26,8 @@ const browser = exports.browser = typeof window !== 'undefined';
* corresponding websocket events
* @property {number} [restTimeOffset=500] Extra time in millseconds to wait before continuing to make REST
* requests (higher values will reduce rate-limiting errors on bad connections)
* @property {number} [restSweepInterval=60] How frequently to delete inactive request buckets, in seconds
* (or 0 for never)
* @property {PresenceData} [presence] Presence data to use upon login
* @property {WSEventType[]} [disabledEvents] An array of disabled websocket events. Events in this array will not be
* processed, potentially resulting in performance improvements for larger bots. Only disable events you are
@@ -48,6 +50,7 @@ exports.DefaultOptions = {
restWsBridgeTimeout: 5000,
disabledEvents: [],
restTimeOffset: 500,
restSweepInterval: 60,
presence: {},
/**