Browse Source

fix(core): Prevent unhandled promise rejection on worker SIGINT

Closes #150. The worker process was hanging with an unhandled promise rejection when being stopped with SIGINT. The underlying issue was found to be an incorrect configuration of the TypeOrmModule. Explicitly naming the connection "worker" was causing Nest to be unable to find that connection when attempting to run the OnDestroy hooks, as explained in https://github.com/nestjs/typeorm/issues/184
Michael Bromley 6 years ago
parent
commit
39ca526b04
1 changed files with 0 additions and 1 deletions
  1. 0 1
      packages/core/src/service/service.module.ts

+ 0 - 1
packages/core/src/service/service.module.ts

@@ -183,7 +183,6 @@ export class ServiceModule {
                     } else {
                         return {
                             ...dbConnectionOptions,
-                            name: 'worker',
                         };
                     }
                 },