Skip to content

Commit

Permalink
feat(socket): subscribe to all events (#2482)
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Fernández <[email protected]>
  • Loading branch information
ferferga authored Oct 28, 2024
1 parent 75f8322 commit 54f0f5b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/plugins/remote/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ class RemotePluginSocket {

private readonly _keepAliveMessage = 'KeepAlive';
private readonly _forceKeepAliveMessage = 'ForceKeepAlive';
private readonly _updateInterval = '0,1';
/**
* Formats the message to be sent to the socket
*/
private readonly _webSocket = useWebSocket(this._socketUrl, {
autoReconnect: { retries: () => true }
autoReconnect: { retries: () => true },
onConnected: () => {
this.sendToSocket('ScheduledTasksInfoStart', this._updateInterval);
this.sendToSocket('ActivityLogEntryStart', this._updateInterval);
this.sendToSocket('SessionsStart', this._updateInterval);
}
});

private readonly _parsedmsg = computed<WebSocketMessage | undefined>(() => destr(this._webSocket.data.value));
Expand Down

0 comments on commit 54f0f5b

Please sign in to comment.