Skip to content

Commit

Permalink
fix:restart on abnormal interruption
Browse files Browse the repository at this point in the history
  • Loading branch information
eouia committed Apr 25, 2019
1 parent 16ce09c commit e91fc99
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion node_helper.js
Expand Up @@ -60,14 +60,19 @@ module.exports = NodeHelper.create({
})
this.shell.on("error", (message)=>{
this.shell.end()

if (!message.traceback.search("KeyboardInterrupt")) {
this.log(message)
} else {
this.log("Keyboard Interrupted")
}
this.log("[GESTURE] Gesture script is finished.")
})
this.shell.on("close", ()=>{
setTimeout(()=>{
this.log("[GESTURE] Python script is terminated. It will restart soon.")
this.job(config)
}, 500)
})
},

gestureProcess: function(gesture) {
Expand Down

0 comments on commit e91fc99

Please sign in to comment.