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

Function clusterWorkflowLayer

packages/infra/test/cluster-sqlite.test.ts:105–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103 return `${step1}:${step2}:${step3}`
104}))
105
106const clusterWorkflowLayer = () => {
107 const prefix = "test_cluster_sqlite"
108 const config = ShardingConfig.layer({
109 runnerAddress: Option.some(testRunnerAddress(20)),
110 shardsPerGroup: 1,
111 availableShardGroups: [testShardGroup("workflow")],
112 assignedShardGroups: [testShardGroup("workflow")],
113 entityTerminationTimeout: 0,
114 entityMessagePollInterval: 50,
115 entityReplyPollInterval: 50,
116 refreshAssignmentsInterval: 0,
117 sendRetryInterval: 50
118 })
119 const storage = Layer
120 .merge(
121 SqlMessageStorage.layerWith({ prefix }),
122 Layer.orDie(SqlRunnerStorage.layerWith({ prefix }))
123 )
124 .pipe(Layer.provide(SqliteClient.layer({ filename: ":memory:" })))
125
126 return Layer
127 .merge(SqliteDeferredWorkflowLayer, SequentialDeferredWorkflowLayer)
128 .pipe(
129 Layer.provideMerge(StepLog.layer),
130 Layer.provideMerge(
131 ClusterWorkflowEngine.layer.pipe(
132 Layer.provideMerge(Sharding.layer),
133 Layer.provide(Runners.layerNoop),
134 Layer.provide(RunnerHealth.layerNoop),
135 Layer.provide(storage),
136 Layer.provide(config),
137 Layer.provide(NodeCrypto.layer)
138 )
139 )
140 )
141}
142

Callers 1

Calls 6

someMethod · 0.80
mergeMethod · 0.80
testRunnerAddressFunction · 0.70
testShardGroupFunction · 0.70
pipeMethod · 0.65
provideMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…