Skip to content

Commit

Permalink
fix: enabled lock check (#5997)
Browse files Browse the repository at this point in the history
We should use the enhanced flagResolver
Tested locally:
```
9:44:13 AM - Starting compilation in watch mode...
[dev:backend] 
[dev:backend] 
[dev:backend] 9:44:26 AM - Found 0 errors. Watching for file changes.
[dev:backend] [2024-01-23T09:44:27.498] [INFO] server-impl.js - DB migration: start
[dev:backend] [2024-01-23T09:44:27.499] [INFO] server-impl.js - Running migration with lock
[dev:backend] [2024-01-23T09:44:29.884] [INFO] server-impl.js - DB migration: end
```
  • Loading branch information
gastonfournier committed Jan 23, 2024
1 parent 48ef88b commit f63581c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/server-impl.ts
Expand Up @@ -141,7 +141,7 @@ async function start(opts: IUnleashOptions = {}): Promise<IUnleash> {
logger.info('DB migration: disabled');
} else {
logger.info('DB migration: start');
if (opts.flagResolver?.isEnabled('migrationLock')) {
if (config.flagResolver.isEnabled('migrationLock')) {
logger.info('Running migration with lock');
const lock = withDbLock(config.db, {
lockKey: defaultLockKey,
Expand Down

0 comments on commit f63581c

Please sign in to comment.