Skip to content

Commit

Permalink
uninterruptible
Browse files Browse the repository at this point in the history
  • Loading branch information
patroza committed Oct 7, 2024
1 parent 901b8c6 commit 65c5ffc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/infra/src/api/routing2.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-empty-object-type */
/* eslint-disable @typescript-eslint/no-explicit-any */

/*
TODO: Effect.retry(r2, optimisticConcurrencySchedule) / was for PATCH only
TODO: uninteruptible commands! was for All except GET.
*/
import { allLower, type EffectUnunified, type LowerServices } from "@effect-app/core/Effect"
import { typedKeysOf } from "@effect-app/core/utils"
import type { Compute } from "@effect-app/core/utils"
Expand Down Expand Up @@ -283,7 +286,12 @@ export const makeRouter2 = <Context, CTXMap extends Record<string, ContextMap.An
>

return HttpRouter.empty.pipe(
HttpRouter.all(("/rpc/" + rsc.meta.moduleName) as any, HttpRpcRouter.toHttpApp(router))
HttpRouter.all(
("/rpc/" + rsc.meta.moduleName) as any,
HttpRpcRouter.toHttpApp(router),
// TODO: not queries.
{ uninterruptible: true }
)
)
}

Expand Down

0 comments on commit 65c5ffc

Please sign in to comment.