Adding a try catch to log if something in the app migration queue fails to process.
This commit is contained in:
parent
5e38ee03f1
commit
85ab9ed2ed
1 changed files with 32 additions and 27 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue