Fix
All checks were successful
Lint / lint (push) Successful in 12s

This commit is contained in:
Julien Valverdé
2026-01-15 22:24:36 +01:00
parent dad4cd60d1
commit 95d0bf70bd

View File

@@ -59,18 +59,17 @@ extends Pipeable.Class() implements Query<K, A, E, R, P> {
} }
get run(): Effect.Effect<void> { get run(): Effect.Effect<void> {
return Effect.provide( return Stream.runForEach(this.key, key => this.interrupt.pipe(
Stream.runForEach(this.key, key => this.interrupt.pipe( Effect.andThen(SubscriptionRef.set(this.latestKey, Option.some(key))),
Effect.andThen(SubscriptionRef.set(this.latestKey, Option.some(key))), Effect.andThen(this.latestFinalResult),
Effect.andThen(this.latestFinalResult), Effect.andThen(previous => this.startCached(key, Option.isSome(previous)
Effect.andThen(previous => this.startCached(key, Option.isSome(previous) ? Result.willFetch(previous.value) as Result.Final<A, E, P>
? Result.willFetch(previous.value) as Result.Final<A, E, P> : Result.initial()
: Result.initial()
)),
Effect.andThen(sub => Effect.forkScoped(this.watch(key, sub))),
this.runSemaphore.withPermits(1),
)), )),
this.context, Effect.andThen(sub => Effect.forkScoped(this.watch(key, sub))),
)).pipe(
this.runSemaphore.withPermits(1),
Effect.provide(this.context),
) )
} }