nounou:Node.js进程守护进程

时间:2021-05-11 05:13:36
【文件属性】:
文件名称:nounou:Node.js进程守护进程
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-11 05:13:36
JavaScript nounou(保姆) Node.js process deamon. 非 Cluster 模式的进程守护 cluster 的 fork 形式仅能对单一进程使用。nounou 适合其他情况,比如守护定时任务。 注意:nounou 仅负责重启,不负责调度,不负责负载均衡。 Usage 编程式使用: const nounou = require('nounou'); const timerPath = '/path/to/timer.js'; // 任务进程 nounou(timerPath).on('fork', (worker) => { console.log('[%s] [%d] new task worker start', Date(), worker.pid); }).on('disconnect', (worker) => { console.error('[%s] [%
【文件预览】:
nounou-master
----.gitignore(526B)
----README.md(2KB)
----bin()
--------nounou(1KB)
----LICENSE(1KB)
----.eslintrc(1KB)
----package.json(571B)
----index.js(3KB)
----example()
--------test.js(134B)
--------master.js(815B)
----.eslintignore(35B)

网友评论