MCPcopy Create free account
hub / github.com/Effect-TS/effect / retryShardRelease

Function retryShardRelease

packages/cluster/src/Sharding.ts:319–335  ·  view source on GitHub ↗
(annotations: { readonly fiber: string; readonly shardId?: ShardId })

Source from the content-addressed store, hash-verified

317 })
318 const retryShardRelease =
319 (annotations: { readonly fiber: string; readonly shardId?: ShardId }) =>
320 <A, E, R>(effect: Effect.Effect<A, E, R>) =>
321 effect.pipe(
322 Effect.sandbox,
323 Effect.tapError((cause) =>
324 Effect.logDebug(`Could not release shards, retrying`, cause).pipe(
325 Effect.annotateLogs({
326 package: "@effect/cluster",
327 module: "Sharding",
328 runner: selfAddress,
329 ...annotations
330 }),
331 Effect.andThen(Effect.sleep(50))
332 )
333 ),
334 Effect.eventually
335 )
336 const releaseShard = Effect.fnUntraced(
337 function*(shardId: ShardId) {
338 yield* runShardRelease(

Callers 1

Sharding.tsFile · 0.85

Calls 2

pipeMethod · 0.65
sleepMethod · 0.65

Tested by

no test coverage detected