Updating worker db config to have replication available (for audit logs).

This commit is contained in:
mike12345567 2023-02-21 17:22:23 +00:00
parent 356d6525e8
commit 41eb0c3964
2 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import { init as coreInit } from "@budibase/backend-core" import * as core from "@budibase/backend-core"
import env from "../environment" import env from "../environment"
export function init() { export function init() {
@ -12,5 +12,5 @@ export function init() {
dbConfig.allDbs = true dbConfig.allDbs = true
} }
coreInit({ db: dbConfig }) core.init({ db: dbConfig })
} }

View File

@ -1,10 +1,16 @@
import * as core from "@budibase/backend-core" import * as core from "@budibase/backend-core"
import env from "../environment" import env from "../environment"
export const init = () => { export function init() {
const dbConfig: any = {} const dbConfig: any = {
replication: true,
find: true,
}
if (env.isTest() && !env.COUCH_DB_URL) { if (env.isTest() && !env.COUCH_DB_URL) {
dbConfig.inMemory = true dbConfig.inMemory = true
dbConfig.allDbs = true
} }
core.init({ db: dbConfig }) core.init({ db: dbConfig })
} }