mirror of
https://github.com/snobu/destreamer.git
synced 2026-01-23 00:12:16 +00:00
very simple test for SIGINT
This commit is contained in:
@@ -21,6 +21,11 @@ export function setProcessEvents(): void {
|
||||
logger.error({ message: msg, fatal: true });
|
||||
});
|
||||
|
||||
process.on('SIGINT', signal => {
|
||||
logger.error(signal);
|
||||
process.exit(777);
|
||||
});
|
||||
|
||||
process.on('unhandledRejection', (reason: {} | null | undefined) => {
|
||||
if (reason instanceof Error) {
|
||||
logger.error({ message: (reason as Error) });
|
||||
|
||||
Reference in New Issue
Block a user