orchestrator changes
This commit is contained in:
@ -418,6 +418,7 @@ io.on("connection", async (socket) => {
|
||||
)
|
||||
|
||||
socket.on("disconnect", async () => {
|
||||
console.log("disconnected", data.userId, data.sandboxId)
|
||||
if (data.isOwner) {
|
||||
// console.log("deleting all terminals")
|
||||
Object.entries(terminals).forEach((t) => {
|
||||
@ -445,11 +446,13 @@ io.on("connection", async (socket) => {
|
||||
}
|
||||
});
|
||||
}, 20000);
|
||||
} else {
|
||||
console.log("number of sockets", sockets.length)
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
httpServer.listen(port, () => {
|
||||
console.log(`Server running on port ${port}`)
|
||||
console.log(`Server, running on port ${port}`)
|
||||
})
|
||||
|
@ -198,7 +198,7 @@ ${code}`,
|
||||
}
|
||||
|
||||
export const stopServer = async (sandboxId: string, userId: string) => {
|
||||
const res = await fetch("http://localhost:4001/stop", {
|
||||
const res = await fetch("https://sylvan-epoch-422219-f9.uc.r.appspot.com/stop", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
Reference in New Issue
Block a user