Skip to content

Commit

Permalink
fix: replicate mongoDB issue DO NOT MERGE (ENG-87)
Browse files Browse the repository at this point in the history
  • Loading branch information
DecathectZero committed Jun 14, 2024
1 parent 79b48ad commit 18f076c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/clients/mongodb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ class MongoDB extends AbstractClient {

async stop() {
await this.client!.close();
await new Promise<void>((resolve) => {
setTimeout(() => {
resolve();
}, 30000);
});
}
}

Expand Down
1 change: 1 addition & 0 deletions start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Server from './server';

try {
await server.start();
await server.stop();
} catch (error) {
log.error(`[app] [http] failed to start server ${log.vars({ error })}`);
}
Expand Down

0 comments on commit 18f076c

Please sign in to comment.