From f63581c03a3bd2d520f26c900876f88246fe88d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Tue, 23 Jan 2024 10:46:48 +0100 Subject: [PATCH] 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 ``` --- src/lib/server-impl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/server-impl.ts b/src/lib/server-impl.ts index 3ee5cc9220..f2c93aeb47 100644 --- a/src/lib/server-impl.ts +++ b/src/lib/server-impl.ts @@ -141,7 +141,7 @@ async function start(opts: IUnleashOptions = {}): Promise { 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,