Updating worker db config to have replication available (for audit logs).
This commit is contained in:
parent
356d6525e8
commit
41eb0c3964
|
@ -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 })
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue