We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0661b93 commit dffb676Copy full SHA for dffb676
index.js
@@ -46,13 +46,19 @@ function start(file) {
46
case 'uptime':
47
p.send(process.uptime());
48
break;
49
+ default:
50
+ console.warn('[⚠️ UNRECOGNIZED MESSAGE]', data);
51
}
52
});
53
54
p.on('exit', (_, code) => {
55
isRunning = false;
- console.error('[❗]Exited with code:', code);
- if (code !== 0) return start(file);
56
+ console.error('[❗] Exited with code:', code);
57
+ if (code !== 0) {
58
+ console.log('[🔄 Restarting worker due to non-zero exit code...');
59
+ return start(file);
60
+ }
61
+
62
watchFile(args[0], () => {
63
unwatchFile(args[0]);
64
start(file);
0 commit comments