Files
nodarium/app/src/lib/runtime/worker-runtime-executor.ts
Max Richter 11de746c01
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 1m58s
feat(app): allow disabling of runtime/registry caches
2026-01-19 14:22:14 +01:00

22 lines
738 B
TypeScript

/// <reference types="vite-plugin-comlink/client" />
import type { Graph, RuntimeExecutor } from "@nodarium/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));
async execute(graph: Graph, settings: Record<string, unknown>) {
return this.worker.executeGraph(graph, settings);
}
async getPerformanceData() {
return this.worker.getPerformanceData();
}
set useRuntimeCache(useCache: boolean) {
this.worker.setUseRuntimeCache(useCache);
}
set useRegistryCache(useCache: boolean) {
this.worker.setUseRegistryCache(useCache);
}
}