Fix: Deaktivierung des Daemon WebSocket und Umstellung auf Socket.io
Änderung: - Der Daemon WebSocket wurde aufgrund von CORS- und Protokollproblemen deaktiviert. - Alle WebSocket-Interaktionen wurden auf Socket.io umgestellt, um die Funktionalität weiterhin zu gewährleisten. - Entsprechende Protokollausgaben wurden hinzugefügt, um den Status der Deaktivierung zu dokumentieren. Diese Anpassung verbessert die Stabilität der Anwendung und sorgt für eine konsistente Handhabung von WebSocket-Events.
This commit is contained in:
@@ -72,10 +72,8 @@ export default {
|
||||
this.selectMainBranch();
|
||||
}
|
||||
|
||||
// Daemon-Socket
|
||||
if (this.daemonSocket) {
|
||||
this.daemonSocket.addEventListener('message', this.handleDaemonMessage);
|
||||
}
|
||||
// Daemon WebSocket deaktiviert - verwende Socket.io
|
||||
console.log('✅ BranchView: Socket.io Events werden verwendet');
|
||||
|
||||
// Live-Socket-Events
|
||||
[
|
||||
|
||||
@@ -207,24 +207,13 @@ export default {
|
||||
await this.fetchFalukantUser();
|
||||
await this.fetchAllStock();
|
||||
await this.fetchProductions();
|
||||
// Daemon WebSocket deaktiviert - verwende Socket.io für alle Events
|
||||
if (this.socket) {
|
||||
this.socket.on("falukantUserUpdated", this.fetchFalukantUser);
|
||||
this.socket.on("production_ready", this.handleProductionReadyEvent);
|
||||
}
|
||||
if (this.daemonSocket) {
|
||||
this.daemonSocket.addEventListener('message', (event) => {
|
||||
try {
|
||||
if (event.data === "ping") return;
|
||||
const message = JSON.parse(event.data);
|
||||
if (message.event === 'production_ready') {
|
||||
this.handleProductionReadyEvent(message);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error processing WebSocket message in FalukantOverviewView:', error);
|
||||
}
|
||||
});
|
||||
console.log('✅ FalukantOverviewView: Socket.io Events registriert');
|
||||
} else {
|
||||
console.log('no daemon socket');
|
||||
console.log('⚠️ FalukantOverviewView: Kein Socket.io verfügbar');
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
@@ -232,9 +221,7 @@ export default {
|
||||
this.socket.off("falukantUserUpdated", this.fetchFalukantUser);
|
||||
this.socket.off("production_ready", this.handleProductionReadyEvent);
|
||||
}
|
||||
if (this.daemonSocket) {
|
||||
this.daemonSocket.onmessage = null;
|
||||
}
|
||||
// Daemon WebSocket deaktiviert - keine Cleanup nötig
|
||||
},
|
||||
methods: {
|
||||
getAgeGroup(age) {
|
||||
|
||||
Reference in New Issue
Block a user