fix: better error handling for bulk sync, fix NaN% progress display
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user