TritonDataCenter / node-workflow

Task orchestration, creation and running using NodeJS
MIT License
456 stars 66 forks source link

Task exception, not able to shut down runner #152

Closed TomKaltz closed 8 years ago

TomKaltz commented 8 years ago

When an unhandled exception occurs in a task, the runner seems to lock up and then when I try to kill the runner I get the following output in an infinite loop and the process will not exit....

{"name":"wf-runner","runner_uuid":"b5467fd0-3b54-11e6-ac61-9e71128cae77","hostname":"Thomass-MacBook-Pro-2.local","pid":7770,"level":30,"msg":"Job with UUID e39cb1ee-04cd-4758-8ba2-4a1bd2d2f1ab canceled.","time":"2016-06-26T18:22:14.029Z","v":0}
{"name":"wf-runner","runner_uuid":"b5467fd0-3b54-11e6-ac61-9e71128cae77","hostname":"Thomass-MacBook-Pro-2.local","pid":7770,"level":30,"msg":"Job with UUID e39cb1ee-04cd-4758-8ba2-4a1bd2d2f1ab canceled.","time":"2016-06-26T18:22:14.282Z","v":0}
{"name":"wf-runner","runner_uuid":"b5467fd0-3b54-11e6-ac61-9e71128cae77","hostname":"Thomass-MacBook-Pro-2.local","pid":7770,"level":30,"msg":"Job with UUID e39cb1ee-04cd-4758-8ba2-4a1bd2d2f1ab canceled.","time":"2016-06-26T18:22:14.533Z","v":0}
kusor commented 8 years ago

I assume you're trying to exit the process with CTRL+Cright?. If that's the case, and given that wf-runner will wait until all the child processes have finished before exiting in case of receiving a SIGINT signal, you should use SIGTERM instead, which will just force the process exiting, ignoring any child processes going on