Allow rebuilds on autoscaling-managed servers
This commit is contained in:
@@ -121,7 +121,8 @@ export function releaseRestartRequest(server: string, source: RestartSource): vo
|
||||
|
||||
export function requestLifecycle(server: string, action: RuntimeAction) {
|
||||
if (!runtimeActions.includes(action)) return { ok: false as const, status: 400, error: 'Choose start, restart, rebuild, or stop.' };
|
||||
const owned = action !== 'restart' ? scalingOwnershipBlocker(server) : null;
|
||||
// Restart and rebuild preserve the lineup; their pending work holds scaling decisions.
|
||||
const owned = action === 'start' || action === 'stop' ? scalingOwnershipBlocker(server) : null;
|
||||
if (owned) return { ok: false as const, status: 409, error: owned };
|
||||
if (!nativeInstance(server) && !unplacedNativeCreation(server)) return { ok: false as const, status: 503, error: 'Server has no native host instance.' };
|
||||
return db().transaction(() => {
|
||||
|
||||
Reference in New Issue
Block a user