Unused starting of signalling-server removed
This commit is contained in:
parent
26a253abf6
commit
0804b48d68
@ -2,7 +2,6 @@ package vassistent.service;
|
||||
|
||||
import vassistent.util.Logger;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@ -32,7 +31,6 @@ public class ProcessManagerService {
|
||||
|
||||
private Process pythonProcess;
|
||||
private Process unrealProcess;
|
||||
private Process unrealSignallingProcess;
|
||||
|
||||
/**
|
||||
* Creates a process manager using runtime configuration values.
|
||||
@ -124,8 +122,6 @@ public class ProcessManagerService {
|
||||
if (!enabled) return;
|
||||
|
||||
try {
|
||||
|
||||
startSignallingServer();
|
||||
startUnrealEngine();
|
||||
|
||||
} 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.
|
||||
*
|
||||
@ -198,7 +166,6 @@ public class ProcessManagerService {
|
||||
|
||||
terminateProcess(pythonProcess);
|
||||
terminateProcess(unrealProcess);
|
||||
terminateProcess(unrealSignallingProcess);
|
||||
|
||||
killProcessFromPidFile(unrealPidFile);
|
||||
killProcessFromPidFile(signallingPidFile);
|
||||
@ -285,15 +252,6 @@ public class ProcessManagerService {
|
||||
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.
|
||||
*
|
||||
|
||||
@ -97,7 +97,6 @@ class ProcessManagerServiceTest {
|
||||
assertTrue(launchedCommands.isEmpty());
|
||||
assertNull(service.getPythonProcess());
|
||||
assertNull(service.getUnrealProcess());
|
||||
assertNull(service.getUnrealSignallingProcess());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -136,8 +135,11 @@ class ProcessManagerServiceTest {
|
||||
List.of("powershell.exe", "-ExecutionPolicy", "Bypass", "-File", "avatar.ps1"),
|
||||
launchedCommands.get(0)
|
||||
);
|
||||
assertTrue(
|
||||
launchedCommands.stream()
|
||||
.noneMatch(command -> !command.isEmpty() && "cmd".equalsIgnoreCase(command.get(0)))
|
||||
);
|
||||
assertSame(process, service.getUnrealProcess());
|
||||
assertNull(service.getUnrealSignallingProcess());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user