mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 12:42:57 +08:00
110e9a455b
* FEATURE: when we fail to ship topic timings attempt to retry This change amends it so 1. Topic timings are treated as background requests and subject to more aggressive rate limits. 2. If we notice an error when we ship timings we back off exponentially The commit allows 405, 429, 500, 501, 502, 503 and 504 errors to be retried. 500+ errors usually happen when self hosters are rebuilding or some other weird condition. 405 happens when site is in readonly. 429 happens when user is rate limited. The retry cadence is hardcoded in AJAX_FAILURE_DELAYS, longest delay is 40 seconds, we may consider enlarging it. After the last delay passes we give up and do not write timings to the server. * Address feedback - Omit promise, no need to use promises in sendNextConsolidatedTiming - Correct issue where >= -1 was used and > -1 was intended - Use objects for consolidated timings instead of Array - Stop using shift/unshift and instead use push / pop which are faster * Move consolidated timing initialization to constructor * Remove TODO and just console.warn if we have an issue |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |