feat: #228 Implement request queue for offline requests with priority#529
Open
levibliz wants to merge 1 commit into
Open
feat: #228 Implement request queue for offline requests with priority#529levibliz wants to merge 1 commit into
levibliz wants to merge 1 commit into
Conversation
…tch sync (rinafcode#228) - Add RequestPriority type: critical, high, normal, low - Persist queue and metrics to AsyncStorage - Implement priority-sorted processing within processQueue - Batch similar requests (PUT/PATCH -> merge payload, GET -> parallel) - Add network state listener for immediate processing on reconnect - Add resume() to restore pending requests on app restart - Track queue analytics (request_queued, request_dequeued, queue_batch_synced, queue_resumed) - Add getQueueStatus() for monitoring queue health - Add getPendingByPriority() for per-priority counts - Update usePendingRequests hook with optional priority filter - Fix App.tsx import path for requestQueue - Add comprehensive test suite - Document queue priority strategy in docs/
|
@levibliz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Kindly resolve conflict and fix workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Enhance request queue to persist offline requests, support priority levels, and batch similar requests during sync.
Changes
Core:
src/services/api/requestQueue.tsRequestPrioritytype:critical | high | normal | lowpriorityfield toQueuedRequestinterfaceresume()to restore pending requests from AsyncStorage on app restartmobileAnalyticsService.trackEvent()getQueueStatus()andgetPendingByPriority()methodsHook:
src/hooks/usePendingRequests.tspendingCountandbyPrioritybreakdown when filter is specifiedFix:
App.tsx./src/services/requestQueue->./src/services/api/requestQueue)Docs:
docs/queue-priority-strategy.mdTests:
tests/services/api/requestQueue.test.tsAcceptance Criteria
Closes #228