Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 如何从Azure Api在nodejs中使用recyclesignalenabled_Node.js_Azure - Fatal编程技术网

Node.js 如何从Azure Api在nodejs中使用recyclesignalenabled

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(); })

如何通过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();
});


应以这种方式使用还是以其他方式使用?

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();
});