-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat(multi-region): metrics for knex for all regional databas…
- Loading branch information
1 parent
f51eb91
commit e8c3450
Showing
7 changed files
with
192 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
import { Knex } from 'knex' | ||
import { logger } from '@/logging/logging' | ||
|
||
export const migrateDbToLatestFactory = | ||
(params: { db: Knex; region: string }) => async () => { | ||
const { db, region } = params | ||
try { | ||
await db.migrate.latest() | ||
} catch (err: unknown) { | ||
logger.error( | ||
{ err, region }, | ||
'Error migrating db to latest for region "{region}".' | ||
) | ||
} | ||
} | ||
export const migrateDbToLatest = (db: Knex) => async () => { | ||
await db.migrate.latest() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.