MCPcopy Create free account
hub / github.com/effect-app/libs / adapterLayer

Function adapterLayer

packages/infra/test/workflow-engine-cosmos.test.ts:238–256  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

236 const prefixFor = (label: string) => `test-${Date.now()}-${label}-`
237
238 const adapterLayer = (prefix: string) =>
239 Layer
240 .mergeAll(
241 IncrementHandler,
242 AwaitOnlyHandler,
243 CounterRef.layer,
244 CosmosClientLayer(cosmosUrl ?? "", cosmosDb)
245 )
246 .pipe(
247 Layer.provideMerge(
248 layerCosmos({
249 url: Redacted.make(cosmosUrl ?? ""),
250 dbName: cosmosDb,
251 prefix,
252 recoveryInterval: Duration.millis(500),
253 clockPollInterval: Duration.millis(500)
254 })
255 )
256 )
257
258 it.live("recovery poller drives execs with stale leases", () => {
259 const prefix = prefixFor("recovery")

Callers 1

Calls 4

CosmosClientLayerFunction · 0.85
pipeMethod · 0.65
makeMethod · 0.65
layerCosmosFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…