fix(sync): improve pull reliability with retry logic and simplified pagination

- Add multi-retry (3 attempts, 2s/3s/5s delays) for cold-start empty responses
- Remove unused offset/end parameters from fetch URL construction
- Fix Accept header to application/json only (avoids content negotiation issues)
- Add PullProgress type and progress tracking in PullEngine
- Export progress via getProgress() for frontend polling
This commit is contained in:
digua authored and digua committed 2026-05-23 16:28:50 +08:00
1 parent f55fb9cf00
commit 31fc9be1ed
5 files changed
+92 -11

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ export class NodeFetcher implements HttpFetcher {
async fetchToTempFile(baseUrl: string, remoteSessionId: string, token: string, params: FetchParams): Promise<string> {
const url = buildPullUrl(baseUrl, remoteSessionId, params)
const headers: Record<string, string> = {
Accept: 'application/json, application/x-ndjson',
Accept: 'application/json',
}
if (token) headers['Authorization'] = `Bearer ${token}`