1
0
Fork 0
mirror of synced 2024-09-30 17:18:14 +13:00

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"
export function init() {
@ -12,5 +12,5 @@ export function init() {
dbConfig.allDbs = true
}
coreInit({ db: dbConfig })
core.init({ db: dbConfig })
}

View file

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