I think it will be even better to encapsulate the whole function body, to catch eventual errors on worker.emitAndForget("restart-me", {});
or on channel.readString(). So from line 27 to 39.