Node.js 如何从Azure Api在nodejs中使用recyclesignalenabled
如何通过Azure调用此函数Node.js 如何从Azure Api在nodejs中使用recyclesignalenabled,node.js,azure,Node.js,Azure,如何通过Azure调用此函数 process.on('SIGTERM', async () => { console.log('Process exited (via SIGTERM)'); await gracefulShutdown(); }); process.on('SIGINT', async () => { console.log('Process exited (via SIGINT)'); await gracefulShutdown(); })
process.on('SIGTERM', async () => {
console.log('Process exited (via SIGTERM)');
await gracefulShutdown();
});
process.on('SIGINT', async () => {
console.log('Process exited (via SIGINT)');
await gracefulShutdown();
});
应以这种方式使用还是以其他方式使用?
recycleSignalEnabled
用于配置iis,因此只能在web.config中进行设置。
它应该像下面这样
很清楚。我如何截获信号并调用我的函数?@AxllLow使您的应用程序
始终处于打开状态。
process.on('SIGTERM', async () => {
console.log('Process exited (via SIGTERM)');
await gracefulShutdown();
});
process.on('SIGINT', async () => {
console.log('Process exited (via SIGINT)');
await gracefulShutdown();
});