]> git.cworth.org Git - zombocom-ai/blobdiff - index.js
Set bus timer to 30 seconds
[zombocom-ai] / index.js
index 2f990748b218d9bc37b4cc5872aa6e793bf83197..4ed609917e9d53d7c749a8b9faf0dde00c2d8a53 100644 (file)
--- a/index.js
+++ b/index.js
@@ -175,7 +175,7 @@ function emit_bus_timer() {
 
 function start_bus_timer() {
     const bus = state.bus;
-    bus.timer = 3; // XXX: 30 in production
+    bus.timer = 30;
     emit_bus_timer();
     bus_interval = setInterval(emit_bus_timer, 1000);
 }
@@ -300,7 +300,8 @@ io_bus.on("connection", (socket) => {
            // Give all clients the new image
            io_bus.emit('output', filename);
        } catch (e) {
-           console.log("Error executing turtle script: " + e);
+           // Send any error out to the users
+           io_bus.emit('error', e.toString())
        }
     });