Add configurable retry logic to request queue:
- Introduce retry settings for specific HTTP status codes with exponential backoff and jitter. - Refactor `requestQueue` to support method-based concurrency limits and retry configuration. - Update `RequestQueueProgress` to respect minimum batch size for progress visibility. - Add unit tests for retry logic, progress visibility, and updated queue behavior. - Centralize request queue configuration in `REQUEST_QUEUE_CONFIG`.
This commit is contained in:
@@ -41,7 +41,12 @@ describe('authenticatedRequest', () => {
|
||||
beforeEach(() => {
|
||||
axiosMock.mockReset();
|
||||
__resetRequestQueueForTests();
|
||||
__configureRequestQueueForTests({ maxConcurrentGet: 1, maxConcurrentOther: 1, spacingMs: 0 });
|
||||
__configureRequestQueueForTests({
|
||||
maxConcurrentGet: 1,
|
||||
maxConcurrentOther: 1,
|
||||
spacingMs: 0,
|
||||
retryByStatusCode: {}
|
||||
});
|
||||
localStorage.clear();
|
||||
localStorage.setItem('token', 'token');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user