From 54f0f5b11f607d9c51db4d3226beb6c7884bb378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Mon, 28 Oct 2024 17:06:02 +0100 Subject: [PATCH] feat(socket): subscribe to all events (#2482) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fernando Fernández --- frontend/src/plugins/remote/socket.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/plugins/remote/socket.ts b/frontend/src/plugins/remote/socket.ts index 1b0cedf0077..9c0581c2828 100644 --- a/frontend/src/plugins/remote/socket.ts +++ b/frontend/src/plugins/remote/socket.ts @@ -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(() => destr(this._webSocket.data.value));