Fix controller stalls during large collection launches

This commit is contained in:
2026-10-05 09:50:11 -04:00
parent 9472bb5184
commit b3929fc771
5 changed files with 192 additions and 20 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { db } from '../db/index.js';
import { listHosts, requireReadyHost } from './index.js';
import { requireReadyLibrary } from '../game-files/index.js';
import { assertReadyLibrary } from '../game-files/index.js';
import type { Host } from '../../hosts.js';
import { capacityCalibration } from './calibration.js';
@@ -101,7 +101,7 @@ export function choosePlacement(options: PlacementOptions): { host: Host; port:
for (const host of listHosts().filter(host => !options.hostId || host.id === options.hostId)) {
try {
requireReadyHost(host.id, { image: options.image, requiredBytes: INSTANCE_STORAGE_BYTES });
requireReadyLibrary(host.id, options.libraryId);
assertReadyLibrary(host.id, options.libraryId);
const port = availableHostPort(host, options);
if (port === null) throw new Error('No available UDP/TCP game port.');
const load = projectedLoad(host, options);