mirror of
https://github.com/snobu/destreamer.git
synced 2026-03-04 19:18:25 +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 });
|
logger.error({ message: msg, fatal: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.on('SIGINT', signal => {
|
||||||
|
logger.error(signal);
|
||||||
|
process.exit(777);
|
||||||
|
});
|
||||||
|
|
||||||
process.on('unhandledRejection', (reason: {} | null | undefined) => {
|
process.on('unhandledRejection', (reason: {} | null | undefined) => {
|
||||||
if (reason instanceof Error) {
|
if (reason instanceof Error) {
|
||||||
logger.error({ message: (reason as Error) });
|
logger.error({ message: (reason as Error) });
|
||||||
|
|||||||
Reference in New Issue
Block a user