mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: enabled lock check (#5997)
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 ```
This commit is contained in:
parent
48ef88b4fa
commit
f63581c03a
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user