Skip to content

Commit e19f946

Browse files
MickLeskProxmoxVE Developer
andauthored
PB 503 retry, IPv6 validation, download concurrency, little performance improvements (#534)
* fix: PB 503 retry, IPv6 validation, download concurrency - Add withPbRetry() with exponential backoff for PocketBase queries that return 503/429 under concurrent tRPC request load (#527) - Accept IPv6 addresses in gateway and DNS resolver fields (#524) - Batch loadMultipleScripts in groups of 5 with Promise.allSettled and inter-batch delay to avoid GitHub rate limits (#523) Closes #527, Closes #524, Closes #523 * perf: increase staleTime, disable refetchOnWindowFocus, use httpBatchLink - staleTime 30s → 5min: script metadata rarely changes, avoids constant re-fetches on every navigation - refetchOnWindowFocus: false: prevents all queries from re-firing when switching tabs or clicking back into the window - httpBatchLink instead of httpBatchStreamLink: responses arrive as single JSON payload instead of streamed chunks, reducing overhead for the typical small tRPC payloads * fix: address TypeScript linting issues and improve error handling across multiple files * fix: resolve TypeScript linting issues by updating error handling and filtering logic --------- Co-authored-by: ProxmoxVE Developer <dev@localhost>
1 parent 9a3312d commit e19f946

16 files changed

Lines changed: 807 additions & 359 deletions

File tree

prisma.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default defineConfig({
1414
studio: {
1515
adapter: async () => {
1616
const { PrismaBetterSqlite3 } = await import('@prisma/adapter-better-sqlite3')
17+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
1718
return new PrismaBetterSqlite3({ url: dbPath })
1819
},
1920
},

scripts/cache-logos.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ async function main() {
1515
});
1616

1717
const entries = records
18+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
1819
.filter((r) => r.logo)
1920
.map((r) => ({ slug: r.slug, url: r.logo }));
2021

2122
console.log(`[cache-logos] Caching ${entries.length} logos...`);
23+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
2224
const result = await cacheLogos(entries);
2325
console.log(
2426
`[cache-logos] Done: ${result.downloaded} downloaded, ${result.skipped} already cached, ${result.errors} errors`,

0 commit comments

Comments
 (0)