Skip to content

Commit

Permalink
[Gitar] Updating TypeScript files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitar committed Aug 19, 2024
1 parent 662c7ab commit 5b48480
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/lib/__snapshots__/create-config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ exports[`should create default config 1`] = `
"value": "",
},
},
"migrationLock": true,
"navigationSidebar": true,
"newEventSearch": false,
"originMiddleware": false,
Expand Down
15 changes: 2 additions & 13 deletions src/lib/server-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { Knex } from 'knex';
import * as permissions from './types/permissions';
import * as eventType from './types/events';
import { Db } from './db/db';
import { defaultLockKey, defaultTimeout, withDbLock } from './util/db-lock';
import { scheduleServices } from './features/scheduler/schedule-services';
import { compareAndLogPostgresVersion } from './util/postgres-version-checker';

Expand Down Expand Up @@ -147,18 +146,8 @@ async function start(opts: IUnleashOptions = {}): Promise<IUnleash> {
logger.info('DB migration: disabled');
} else {
logger.info('DB migration: start');
if (config.flagResolver.isEnabled('migrationLock')) {
logger.info('Running migration with lock');
const lock = withDbLock(config.db, {
lockKey: defaultLockKey,
timeout: defaultTimeout,
logger,
});
await lock(migrateDb)(config);
} else {
logger.info('Running migration without lock');
await migrateDb(config);
}
logger.info('Running migration without lock');
await migrateDb(config);

logger.info('DB migration: end');
}
Expand Down
2 changes: 0 additions & 2 deletions src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export type IFlagKey =
| 'caseInsensitiveInOperators'
| 'strictSchemaValidation'
| 'personalAccessTokensKillSwitch'
| 'migrationLock'
| 'demo'
| 'googleAuthEnabled'
| 'disableBulkToggle'
Expand Down Expand Up @@ -119,7 +118,6 @@ const flags: IFlags = {
process.env.UNLEASH_PAT_KILL_SWITCH,
false,
),
migrationLock: parseEnvVarBoolean(process.env.MIGRATION_LOCK, true),
demo: parseEnvVarBoolean(process.env.UNLEASH_DEMO, false),
googleAuthEnabled: parseEnvVarBoolean(
process.env.GOOGLE_AUTH_ENABLED,
Expand Down

0 comments on commit 5b48480

Please sign in to comment.