Skip to content

Commit

Permalink
chore: add logs (#5996)
Browse files Browse the repository at this point in the history
Validate we're not using locks
  • Loading branch information
gastonfournier authored Jan 23, 2024
1 parent 3fd735a commit 0b1d565
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/server-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async function start(opts: IUnleashOptions = {}): Promise<IUnleash> {
if (config.db.disableMigration) {
logger.info('DB migration: disabled');
} else {
logger.debug('DB migration: start');
logger.info('DB migration: start');
if (opts.flagResolver?.isEnabled('migrationLock')) {
logger.info('Running migration with lock');
const lock = withDbLock(config.db, {
Expand All @@ -150,10 +150,11 @@ async function start(opts: IUnleashOptions = {}): Promise<IUnleash> {
});
await lock(migrateDb)(config);
} else {
logger.info('Running migration without lock');
await migrateDb(config);
}

logger.debug('DB migration: end');
logger.info('DB migration: end');
}
} catch (err) {
logger.error('Failed to migrate db', err);
Expand Down

0 comments on commit 0b1d565

Please sign in to comment.