refactor(truncation): effectify TruncateService, delete Scheduler (#17957)

This commit is contained in:
Kit Langton 2026-03-17 21:59:54 -04:00 committed by GitHub
commit 5dfe86dcb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 406 additions and 483 deletions

View file

@ -3,10 +3,15 @@ import { AccountService } from "@/account/service"
import { AuthService } from "@/auth/service"
import { Instances } from "@/effect/instances"
import type { InstanceServices } from "@/effect/instances"
import { TruncateEffect } from "@/tool/truncate-effect"
import { Instance } from "@/project/instance"
export const runtime = ManagedRuntime.make(
Layer.mergeAll(AccountService.defaultLayer, Instances.layer).pipe(Layer.provideMerge(AuthService.defaultLayer)),
Layer.mergeAll(
AccountService.defaultLayer, //
TruncateEffect.defaultLayer,
Instances.layer,
).pipe(Layer.provideMerge(AuthService.defaultLayer)),
)
export function runPromiseInstance<A, E>(effect: Effect.Effect<A, E, InstanceServices>) {