chore(web): ensure builder connect to the specific instance id

This commit is contained in:
BennyKok
2024-01-07 21:06:47 +08:00
parent 01a9c1a1d6
commit 7ab4edb069
7 changed files with 746 additions and 0 deletions
+10
View File
@@ -189,6 +189,16 @@ async function buildMachine(
})
.where(eq(machinesTable.id, b.id));
throw new Error(`Error: ${result.statusText} ${error_log}`);
} else {
// setting the build machine id
const json = await result.json();
await db
.update(machinesTable)
.set({
...data,
build_machine_instance_id: json.build_machine_instance_id,
})
.where(eq(machinesTable.id, b.id));
}
}