Unused starting of signalling-server removed

This commit is contained in:
Niklas Aumueller 2026-03-06 16:41:55 +01:00
parent 26a253abf6
commit 0804b48d68
2 changed files with 4 additions and 44 deletions

View File

@ -2,7 +2,6 @@ package vassistent.service;
import vassistent.util.Logger; import vassistent.util.Logger;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
@ -32,7 +31,6 @@ public class ProcessManagerService {
private Process pythonProcess; private Process pythonProcess;
private Process unrealProcess; private Process unrealProcess;
private Process unrealSignallingProcess;
/** /**
* Creates a process manager using runtime configuration values. * Creates a process manager using runtime configuration values.
@ -124,8 +122,6 @@ public class ProcessManagerService {
if (!enabled) return; if (!enabled) return;
try { try {
startSignallingServer();
startUnrealEngine(); startUnrealEngine();
} catch (IOException e) { } catch (IOException e) {
@ -133,34 +129,6 @@ public class ProcessManagerService {
} }
} }
/**
* Starts the Unreal signalling server script.
*
* @throws IOException if process startup fails
*/
private void startSignallingServer() throws IOException {
String script =
cleanConfigValue(
config.getProperty("unreal.signalling_server.script")
);
if (script == null) return;
ProcessBuilder pb = new ProcessBuilder(
"cmd",
"/c",
script);
pb.redirectErrorStream(true);
unrealSignallingProcess = null;
//pb.start();
Logger.info("PROCESS",
"Unreal Signalling Server gestartet" + pb.command());
}
/** /**
* Starts the configured Unreal executable script via PowerShell. * Starts the configured Unreal executable script via PowerShell.
* *
@ -198,7 +166,6 @@ public class ProcessManagerService {
terminateProcess(pythonProcess); terminateProcess(pythonProcess);
terminateProcess(unrealProcess); terminateProcess(unrealProcess);
terminateProcess(unrealSignallingProcess);
killProcessFromPidFile(unrealPidFile); killProcessFromPidFile(unrealPidFile);
killProcessFromPidFile(signallingPidFile); killProcessFromPidFile(signallingPidFile);
@ -285,15 +252,6 @@ public class ProcessManagerService {
return unrealProcess; return unrealProcess;
} }
/**
* Returns the currently tracked Unreal signalling process.
*
* @return signalling process or {@code null}
*/
Process getUnrealSignallingProcess() {
return unrealSignallingProcess;
}
/** /**
* Normalizes string values loaded from properties and strips optional quotes. * Normalizes string values loaded from properties and strips optional quotes.
* *

View File

@ -97,7 +97,6 @@ class ProcessManagerServiceTest {
assertTrue(launchedCommands.isEmpty()); assertTrue(launchedCommands.isEmpty());
assertNull(service.getPythonProcess()); assertNull(service.getPythonProcess());
assertNull(service.getUnrealProcess()); assertNull(service.getUnrealProcess());
assertNull(service.getUnrealSignallingProcess());
} }
/** /**
@ -136,8 +135,11 @@ class ProcessManagerServiceTest {
List.of("powershell.exe", "-ExecutionPolicy", "Bypass", "-File", "avatar.ps1"), List.of("powershell.exe", "-ExecutionPolicy", "Bypass", "-File", "avatar.ps1"),
launchedCommands.get(0) launchedCommands.get(0)
); );
assertTrue(
launchedCommands.stream()
.noneMatch(command -> !command.isEmpty() && "cmd".equalsIgnoreCase(command.get(0)))
);
assertSame(process, service.getUnrealProcess()); assertSame(process, service.getUnrealProcess());
assertNull(service.getUnrealSignallingProcess());
} }
/** /**