Add listeners for sigint, sigquit, sighup (#23148)
## Description Adding event listeners for SIGINT, SIGQUIT, SIGHUP to log these events. Co-authored-by: Shubhangi Agarwal <shuagarwal@microsoft.com>
This commit is contained in:
Родитель
ef46033a96
Коммит
9830a0ee76
|
@ -83,6 +83,16 @@ export async function run<T extends IResources>(
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.on("SIGINT", () => {
|
||||||
|
Lumberjack.info(`Received SIGINT request to stop the service.`);
|
||||||
|
});
|
||||||
|
process.on("SIGQUIT", () => {
|
||||||
|
Lumberjack.info(`Received SIGQUIT request to stop the service.`);
|
||||||
|
});
|
||||||
|
process.on("SIGHUP", () => {
|
||||||
|
Lumberjack.info(`Received SIGHUP request to stop the service.`);
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Wait for the runner to complete
|
// Wait for the runner to complete
|
||||||
await runningP;
|
await runningP;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче