enable NestJS shutdown hooks
This commit is contained in:
parent
a4c0ef824c
commit
d4105dee0c
1 changed files with 2 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ export async function server() {
|
|||
const app = await NestFactory.createApplicationContext(MainModule, {
|
||||
logger: new NestLogger(),
|
||||
});
|
||||
app.enableShutdownHooks();
|
||||
|
||||
const serverService = app.get(ServerService);
|
||||
await serverService.launch();
|
||||
|
|
@ -39,6 +40,7 @@ export async function jobQueue() {
|
|||
const jobQueue = await NestFactory.createApplicationContext(QueueProcessorModule, {
|
||||
logger: new NestLogger(),
|
||||
});
|
||||
jobQueue.enableShutdownHooks();
|
||||
|
||||
jobQueue.get(QueueProcessorService).start();
|
||||
jobQueue.get(ChartManagementService).start();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue