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

Function publish

packages/infra/src/ClusterServiceBus.ts:113–121  ·  view source on GitHub ↗
(message: Message.Outgoing<R>)

Source from the content-addressed store, hash-verified

111 yield* Scope.addFinalizer(scope, Effect.promise(() => sender.close()).pipe(Effect.ignore))
112
113 const publish = <R extends Rpc.Any>(message: Message.Outgoing<R>) =>
114 Effect
115 .tryPromise({
116 try: () => sender.sendMessages(storageNotification(message)),
117 catch: (cause) => new ServiceBusPublishError({ cause })
118 })
119 .pipe(
120 Effect.catch((cause) => Effect.logDebug("Could not publish cluster storage notification", cause))
121 )
122
123 return yield* Runners.make({
124 ping: (address) => Effect.fail(new ClusterError.RunnerUnavailable({ address })),

Callers 2

TxPubSub.tsFile · 0.85

Calls 3

storageNotificationFunction · 0.85
catchMethod · 0.80
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…