fixing issues with shutting down of tasks

This commit is contained in:
Isadora White 2025-06-14 14:23:25 -05:00
parent b2de1cda17
commit eb09c2f08e
2 changed files with 10 additions and 2 deletions

View file

@ -132,7 +132,15 @@ export function createMindServer(host_public = false, port = 8080) {
socket.on('shutdown', () => {
console.log('Shutting down');
process.exit(0);
for (let agentName in agent_connections) {
mindcraft.stopAgent(agentName);
}
// wait 2 seconds
setTimeout(() => {
console.log('Exiting MindServer');
process.exit(0);
}, 2000);
});
socket.on('send-message', (agentName, message) => {

View file

@ -26,7 +26,7 @@
}
},
"type": "debug",
"timeout": 60
"timeout": 25
},
"debug_2_agent_timeout": {
"goal": "Just stand at a place and don't do anything",