Init jsrunners on threads

This commit is contained in:
Adria Navarro 2024-02-12 16:59:14 +01:00
parent 36ea9b9df1
commit 6823b23ac4
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import { QueryVariable } from "./definitions"
import env from "../environment"
import * as db from "../db"
import { redis, db as dbCore } from "@budibase/backend-core"
import * as jsRunner from "../jsRunner"
const VARIABLE_TTL_SECONDS = 3600
let client: any
@ -29,7 +30,9 @@ export function threadSetup() {
console.debug(`[${env.FORKED_PROCESS_NAME}] thread setup skipped`)
return
}
console.debug(`[${env.FORKED_PROCESS_NAME}] thread setup running`)
jsRunner.init()
db.init()
}