fix: address review comments

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2024-01-02 09:57:19 +02:00
parent 0b21422604
commit da5c3fb818
34 changed files with 413 additions and 465 deletions
+3 -7
View File
@@ -56,13 +56,9 @@ all subscribers, you can use `*` as `to` parameter.
```ts
// Periodic sending example
setInterval(async () => {
// You can use hasSubscribers to check if the message will be sent to anyone
// in case you need some heavy processing before that
if (signalService.hasSubscribers('plugin:topic')) {
await signalService.publish('*', 'plugin:topic', {
message: 'hello world',
});
}
await signalService.publish('*', 'plugin:topic', {
message: 'hello world',
});
}, 5000);
```