Files
nodarium/app/src/lib/runtime/worker-runtime-executor.ts
Max Richter 5421349c79
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 4s
feat: migrate some more stuff to svelte-5, mainly app settings
2024-11-08 02:38:19 +01:00

19 lines
602 B
TypeScript

/// <reference types="vite-plugin-comlink/client" />
import type { Graph, RuntimeExecutor } from "@nodes/types";
export class WorkerRuntimeExecutor implements RuntimeExecutor {
private worker = new ComlinkWorker<typeof import('./worker-runtime-executor-backend.ts')>(new URL(`./worker-runtime-executor-backend.ts`, import.meta.url));
constructor() {
console.log(import.meta.url)
}
async execute(graph: Graph, settings: Record<string, unknown>) {
return this.worker.executeGraph(graph, settings);
}
async getPerformanceData() {
return this.worker.getPerformanceData();
}
}