Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
satazor committed Dec 21, 2024
1 parent 54edff6 commit 82ddf72
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,27 +180,32 @@ class ProcessManager {

this.terminating = true;

console.log('1');
if (this.running.size || this.startedShutdown) {
return;
}

this.startedShutdown = true;

console.log('2');
this.log.info('Starting shutdown');

await this.hook('drain');

console.log('3');
this.log.info(`${this.hooks.filter(({ type }) => type === 'drain').length} server(s) drained`);

await this.hook('disconnect');

console.log('4');

this.log.info(`${this.hooks.filter(({ type }) => type === 'disconnect').length} service(s) disconnected`);

await this.hook('exit', this.errors);

this.log.info('Flushing output');
console.log('5');
// this.log.info('Flushing output');

await this.flushOutput();
// await this.flushOutput();

this.exit();
}
Expand Down

0 comments on commit 82ddf72

Please sign in to comment.