Skip to content

Commit

Permalink
feat:application shutdown hook added
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadeera3784 committed Jun 25, 2024
1 parent 619f41c commit cc38a8d
Show file tree
Hide file tree
Showing 6 changed files with 1,025 additions and 1,221 deletions.
8 changes: 6 additions & 2 deletions apps/backend/src/modules/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Module } from '@nestjs/common';
import { Logger, Module, OnApplicationShutdown } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { EventEmitterModule } from '@nestjs/event-emitter';
import { BullModule } from '@nestjs/bull';
Expand Down Expand Up @@ -99,4 +99,8 @@ import { AnalyticModule } from '../analytic/analytic.module';
providers: [AppService, CacheService, EmailService, GetSharedFiltersFeature],
exports: [AppService, CacheService, EmailService],
})
export class AppModule {}
export class AppModule implements OnApplicationShutdown {
onApplicationShutdown(signal: string): void {
Logger.debug(`Application shut down (signal: ${signal})`);
}
}
Loading

0 comments on commit cc38a8d

Please sign in to comment.