mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-01 17:39:39 +02:00
Use native runtimes for flow entrypoints
This commit is contained in:
parent
54fc21b38d
commit
74955d6041
38 changed files with 233 additions and 134 deletions
|
|
@ -20,8 +20,9 @@ import {
|
|||
type TriplesQueryResponse,
|
||||
type Spec,
|
||||
} from "@trustgraph/base";
|
||||
import { NodeRuntime } from "@effect/platform-node";
|
||||
import { makeFlowProcessorProgram } from "@trustgraph/base";
|
||||
import { Effect } from "effect";
|
||||
import { Effect, Layer, ManagedRuntime } from "effect";
|
||||
import {
|
||||
FalkorDBTriplesQueryLive,
|
||||
FalkorDBTriplesQueryService,
|
||||
|
|
@ -100,6 +101,12 @@ export const program = makeFlowProcessorProgram<ProcessorConfig & FalkorDBQueryC
|
|||
layer: (config) => FalkorDBTriplesQueryLive(config),
|
||||
});
|
||||
|
||||
const triplesQueryRuntime = ManagedRuntime.make(Layer.empty);
|
||||
|
||||
export function run(): Promise<void> {
|
||||
return Effect.runPromise(program);
|
||||
return triplesQueryRuntime.runPromise(program);
|
||||
}
|
||||
|
||||
export function runMain(): void {
|
||||
NodeRuntime.runMain(program);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue