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

Function deploy

packages/cluster/test/ClusterCron.test.ts:68–83  ·  view source on GitHub ↗
(
  entities: Layer.Layer<never, never, Sharding.Sharding>,
  use: Effect.Effect<void, never, Sharding.Sharding> = TestClock.adjust(3500)
)

Source from the content-addressed store, hash-verified

66
67// one runner process over message storage that outlives it
68const deploy = (
69 entities: Layer.Layer<never, never, Sharding.Sharding>,
70 use: Effect.Effect<void, never, Sharding.Sharding> = TestClock.adjust(3500)
71) =>
72 Effect.flatMap(MessageStorage.MemoryDriver, (driver) =>
73 Effect.provide(
74 use,
75 entities.pipe(
76 Layer.provideMerge(Sharding.layer),
77 Layer.provide(Runners.layerNoop),
78 Layer.provide(Layer.succeed(MessageStorage.MessageStorage, driver.storage)),
79 Layer.provide(RunnerStorage.layerMemory),
80 Layer.provide(RunnerHealth.layerNoop),
81 Layer.provide(TestShardingConfig)
82 )
83 ))
84
85// stands in for the rest of the application in a deploy without the cron
86const Other = Entity.make("Other", [Rpc.make("Ping")])

Callers 1

Calls 3

adjustMethod · 0.65
provideMethod · 0.65
pipeMethod · 0.65

Tested by

no test coverage detected