Merge pull request #3793 from Budibase/fix/pouch-automation-error
Fix automation TypeError: Pouch is not a constructor
This commit is contained in:
commit
a9a7fb0cf4
|
@ -1,6 +1,5 @@
|
|||
// when thread starts, make sure it is recorded
|
||||
require("./utils").threadSetup()
|
||||
const env = require("../environment")
|
||||
env.setInThread()
|
||||
const actions = require("../automations/actions")
|
||||
const automationUtils = require("../automations/automationUtils")
|
||||
const AutomationEmitter = require("../events/AutomationEmitter")
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
// when thread starts, make sure it is recorded
|
||||
const env = require("../environment")
|
||||
env.setInThread()
|
||||
require("./utils").threadSetup()
|
||||
const ScriptRunner = require("../utilities/scriptRunner")
|
||||
const { integrations } = require("../integrations")
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
const env = require("../environment")
|
||||
const CouchDB = require("../db")
|
||||
const { init } = require("@budibase/auth")
|
||||
|
||||
exports.threadSetup = () => {
|
||||
// don't run this if not threading
|
||||
if (env.isTest() || env.DISABLE_THREADING) {
|
||||
return
|
||||
}
|
||||
// when thread starts, make sure it is recorded
|
||||
env.setInThread()
|
||||
init(CouchDB)
|
||||
}
|
Loading…
Reference in New Issue