MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / publishEvent

Function publishEvent

packages/redis/publisher.ts:27–35  ·  view source on GitHub ↗
(
  channel: Channel,
  type: keyof IPublishChannels[Channel],
  event: IPublishChannels[Channel][typeof type],
  multi?: ReturnType<Redis['multi']>,
)

Source from the content-addressed store, hash-verified

25}
26
27export function publishEvent<Channel extends keyof IPublishChannels>(
28 channel: Channel,
29 type: keyof IPublishChannels[Channel],
30 event: IPublishChannels[Channel][typeof type],
31 multi?: ReturnType<Redis['multi']>,
32) {
33 const redis = multi ?? getRedisPub();
34 return redis.publish(getSubscribeChannel(channel, type), setSuperJson(event));
35}
36
37export function parsePublishedEvent<Channel extends keyof IPublishChannels>(
38 _channel: Channel,

Callers 3

processBufferMethod · 0.90
notificationJobFunction · 0.90
syncSubscriptionToOrgFunction · 0.90

Calls 3

getRedisPubFunction · 0.90
setSuperJsonFunction · 0.90
getSubscribeChannelFunction · 0.85

Tested by

no test coverage detected