Merge pull request #14076 from Budibase/fix/app-migration-queue
App migration queue created consistently
This commit is contained in:
commit
6885ac01f3
|
@ -49,7 +49,6 @@ export async function checkMissingMigrations(
|
||||||
const queue = getAppMigrationQueue()
|
const queue = getAppMigrationQueue()
|
||||||
|
|
||||||
if (
|
if (
|
||||||
queue &&
|
|
||||||
latestMigration &&
|
latestMigration &&
|
||||||
getTimestamp(currentVersion) < getTimestamp(latestMigration)
|
getTimestamp(currentVersion) < getTimestamp(latestMigration)
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -11,10 +11,9 @@ export type AppMigrationJob = {
|
||||||
appId: string
|
appId: string
|
||||||
}
|
}
|
||||||
|
|
||||||
let appMigrationQueue: queue.Queue<AppMigrationJob> | undefined
|
// always create app migration queue - so that events can be pushed and read from it
|
||||||
|
// across the different api and automation services
|
||||||
export function init() {
|
const appMigrationQueue = queue.createQueue<AppMigrationJob>(
|
||||||
appMigrationQueue = queue.createQueue<AppMigrationJob>(
|
|
||||||
queue.JobQueue.APP_MIGRATION,
|
queue.JobQueue.APP_MIGRATION,
|
||||||
{
|
{
|
||||||
jobOptions: {
|
jobOptions: {
|
||||||
|
@ -31,6 +30,7 @@ export function init() {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
export function init() {
|
||||||
return appMigrationQueue.process(MIGRATION_CONCURRENCY, processMessage)
|
return appMigrationQueue.process(MIGRATION_CONCURRENCY, processMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue