Fix controller stalls during large collection launches
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user