mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-14 03:55:17 +02:00
fixing issues with shutting down of tasks
This commit is contained in:
parent
b2de1cda17
commit
eb09c2f08e
2 changed files with 10 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue