fix: better error handling for bulk sync, fix NaN% progress display

This commit is contained in:
2026-04-30 23:04:51 +08:00
parent 5f037481ec
commit e38a2fabe7
2 changed files with 30 additions and 11 deletions
+4
View File
@@ -294,9 +294,13 @@ export const gameSyncRoutes = new Elysia({ prefix: "/games" })
return { total: 0, synced: 0, failed: 0, message: "No games to sync" };
}
console.log(`[Bulk Sync] Starting sync of ${gamesToSync.length} games with concurrency ${SYNC_CONCURRENCY}`)
// Process syncs in parallel with controlled concurrency
const { synced, failed } = await syncInParallel(gamesToSync, SYNC_CONCURRENCY);
console.log(`[Bulk Sync] Complete: ${synced} synced, ${failed} failed`)
return {
total: gamesToSync.length,
synced,