Remove unneeded jsRunner/index.ts code.

This commit is contained in:
Sam Rose 2024-02-13 12:18:16 +00:00
parent f6137e0974
commit 4bcf133259
No known key found for this signature in database
1 changed files with 0 additions and 4 deletions

View File

@ -4,15 +4,11 @@ import { setJSRunner, setOnErrorLog } from "@budibase/string-templates"
import { context, logging, timers } from "@budibase/backend-core"
import tracer from "dd-trace"
import { serializeError } from "serialize-error"
import { IsolatedVM } from "./vm"
type TrackerFn = <T>(f: () => T) => T
export function init() {
setJSRunner((js: string, ctx: vm.Context) => {
const ivm = new IsolatedVM({ memoryLimit: 10, invocationTimeout: 1000 })
ivm.withContext(ctx)
return tracer.trace("runJS", {}, span => {
const perRequestLimit = env.JS_PER_REQUEST_TIMEOUT_MS
let track: TrackerFn = f => f()