Cancel active provisioning jobs when rolling back betas

This commit is contained in:
2026-10-05 17:48:46 -04:00
parent 6ad5e7f4c6
commit 701066aaf8
25 changed files with 564 additions and 37 deletions
@@ -0,0 +1,10 @@
import { json } from '@sveltejs/kit';
import { cancelCreation } from '$lib/server/provisioning/cancel-creation.js';
import { kickProvisioning } from '$lib/server/pipeline/worker.js';
export function POST({ params }: { params: { id: string } }) {
const cleanupId = cancelCreation(params.id);
if (!cleanupId) return json({ error: 'This creation can no longer be removed. Refresh its current state.' }, { status: 409 });
void kickProvisioning();
return json({ ok: true, cleanupId });
}