mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
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:
1 parent
f55fb9cf00
commit
31fc9be1ed
5 files changed
+92
-11
No files matched your search
@@ -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}`
|
||||
|
||||
|
||||
Reference in new issue
Block a user