feat(socket): subscribe to all events (#2482)
Some checks are pending
Push & Release 🌍 / Automation 🎛️ (push) Waiting to run
Push & Release 🌍 / ${{ github.event_name == 'push' && 'Unstable 🚀⚠️' || 'Stable 🏷️✅' }} (push) Waiting to run
Push & Release 🌍 / GitHub CodeQL 🔬 (push) Waiting to run
Push & Release 🌍 / Deploy 🚀 (push) Blocked by required conditions

Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
This commit is contained in:
Fernando Fernández 2024-10-28 17:06:02 +01:00 committed by GitHub
parent 75f83228ed
commit 54f0f5b11f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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));