1
0
Fork 0
mirror of synced 2024-09-09 22:16:26 +12:00

Adding a try catch to log if something in the app migration queue fails to process.

This commit is contained in:
mike12345567 2024-06-07 18:09:48 +01:00
parent 5e38ee03f1
commit 85ab9ed2ed

View file

@ -1,4 +1,4 @@
import { context, locks } from "@budibase/backend-core"
import { context, locks, logging } from "@budibase/backend-core"
import { LockName, LockType } from "@budibase/types"
import {
@ -20,6 +20,7 @@ export async function processMigrations(
resource: appId,
},
async () => {
try {
await context.doInAppMigrationContext(appId, async () => {
let currentVersion = await getAppMigrationVersion(appId)
@ -51,6 +52,10 @@ export async function processMigrations(
currentVersion = id
}
})
} catch (err) {
logging.logAlert("Failed to run app migration", err)
throw err
}
}
)