Discord verification team reported that Optimistic Oracle bots are rate limited to 1 ticket per every serverless run cycle of 5 minutes. This is a bug that should be fixed.
Summary
Fixes Discord Ticket logger bug to allow submit max tickets as permitted by intended rate limit (1 ticket per 15 seconds).
Details
The bug is fixed by moving signal to pause persistent log queue transports only after waiting for logger flush timeout (we use 5 minutes for Oracle bots). In order to gracefully handle log delivery once this timeout passes this fix also changes pauseProcessing method to async and waits for processed event emitted from processLogQueue when it gets out of while (this.canProcess) loop.
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
[ ] Ran end-to-end test, running the code as in production
[ ] New unit tests created
[ ] Existing tests adequate, no new tests required
Motivation
Discord verification team reported that Optimistic Oracle bots are rate limited to 1 ticket per every serverless run cycle of 5 minutes. This is a bug that should be fixed.
Summary
Fixes Discord Ticket logger bug to allow submit max tickets as permitted by intended rate limit (1 ticket per 15 seconds).
Details
The bug is fixed by moving signal to pause persistent log queue transports only after waiting for logger flush timeout (we use 5 minutes for Oracle bots). In order to gracefully handle log delivery once this timeout passes this fix also changes
pauseProcessing
method to async and waits forprocessed
event emitted fromprocessLogQueue
when it gets out ofwhile (this.canProcess)
loop.Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
Issue(s)
Fixes #XXXX