network chunk v20
This commit is contained in:
@@ -20,3 +20,20 @@ const networkScanner = new NetworkScanner(
|
||||
errorPage,
|
||||
databaseResetPage
|
||||
);
|
||||
|
||||
process.on('SIGTERM', async () => {
|
||||
console.log('Received SIGTERM. Cleaning up...');
|
||||
await cleanupAndExit();
|
||||
});
|
||||
|
||||
process.on('SIGINT', async () => {
|
||||
console.log('Received SIGINT. Cleaning up...');
|
||||
await cleanupAndExit();
|
||||
});
|
||||
|
||||
async function cleanupAndExit() {
|
||||
networkScanner.stopAllIntervals();
|
||||
|
||||
console.log('Cleanup complete. Exiting.');
|
||||
process.exit(0); // Exit with code 0 to indicate a clean exit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user