Merge pull request #13930 from Budibase/fix/app-migrations-automation-service
Moving app migrations back to automation worker service
This commit is contained in:
commit
5367696abd
|
@ -25,8 +25,8 @@ export async function getAppMigrationVersion(appId: string): Promise<string> {
|
||||||
|
|
||||||
let metadata: AppMigrationDoc | undefined = await cache.get(cacheKey)
|
let metadata: AppMigrationDoc | undefined = await cache.get(cacheKey)
|
||||||
|
|
||||||
// We don't want to cache in dev or QA in order to be able to tweak it
|
// returned cached version if we found one
|
||||||
if (metadata && !env.isDev() && !env.isQA()) {
|
if (metadata?.version) {
|
||||||
return metadata.version
|
return metadata.version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import * as pro from "@budibase/pro"
|
||||||
import * as api from "../api"
|
import * as api from "../api"
|
||||||
import sdk from "../sdk"
|
import sdk from "../sdk"
|
||||||
import { initialise as initialiseWebsockets } from "../websockets"
|
import { initialise as initialiseWebsockets } from "../websockets"
|
||||||
import { apiEnabled, automationsEnabled, printFeatures } from "../features"
|
import { automationsEnabled, printFeatures } from "../features"
|
||||||
import * as jsRunner from "../jsRunner"
|
import * as jsRunner from "../jsRunner"
|
||||||
import Koa from "koa"
|
import Koa from "koa"
|
||||||
import { Server } from "http"
|
import { Server } from "http"
|
||||||
|
@ -121,8 +121,6 @@ export async function startup(
|
||||||
// app migrations and automations on other service
|
// app migrations and automations on other service
|
||||||
if (automationsEnabled()) {
|
if (automationsEnabled()) {
|
||||||
queuePromises.push(automations.init())
|
queuePromises.push(automations.init())
|
||||||
}
|
|
||||||
if (apiEnabled()) {
|
|
||||||
queuePromises.push(appMigrations.init())
|
queuePromises.push(appMigrations.init())
|
||||||
}
|
}
|
||||||
queuePromises.push(initPro())
|
queuePromises.push(initPro())
|
||||||
|
|
Loading…
Reference in New Issue