Skip to content

Commit

Permalink
feat: make index creation non-blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoffroy Empain committed Dec 10, 2020
1 parent 210eb8c commit 1ee2b7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ if (env.MELI_SENTRY_ENABLED && SENTRY_DSN && SENTRY_RELEASE) {
export async function server(): Promise<any> {
await AppDb.init();
await migrate(AppDb.client, AppDb.db);
await setupDbIndexes();
setupDbIndexes().catch(err => {
logger.error('Could not setup indexes indexes');
logger.error(err);
});
await configureCaddy();

const app = express();
Expand Down

0 comments on commit 1ee2b7b

Please sign in to comment.