fastify-graceful-shutdown:正常关机即可固定

时间:2021-05-02 09:28:03
【文件属性】:
文件名称:fastify-graceful-shutdown:正常关机即可固定
文件大小:86KB
文件格式:ZIP
更新时间:2021-05-02 09:28:03
fastify graceful fastifyjs-plugin JavaScript :bow_and_arrow: 平稳关闭 关闭异步优雅地关闭。 默认情况下,当触发SIGINT或SIGTERM时,将调用fastify close hook。 安装 npm install --save fastify-graceful-shutdown 注册插件 fastify . register ( require ( 'fastify-graceful-shutdown' ) ) 用法 fastify . gracefulShutdown ( ( signal , next ) => { next ( ) } ) 注意事项 除此插件外,请勿注册信号处理程序。 不能与以外的其他记录器一起使用,因为我们使用子记录器功能来封装日志。 使用fastify onClose挂钩释放插件中的资源。 经过一定的超时(默认10秒)后,该进程将退出,以防止进程卡死。
【文件预览】:
fastify-graceful-shutdown-master
----.gitignore(902B)
----package.json(1KB)
----LICENSE(1KB)
----index.js(2KB)
----test.js(174B)
----README.md(1KB)
----example.js(675B)
----index.test-d.ts(177B)
----yarn.lock(198KB)
----index.d.ts(405B)

网友评论