no message

This commit is contained in:
2024-04-23 16:40:05 +03:00
parent 291c804fc7
commit f2d0eb0d2c
5 changed files with 60 additions and 30 deletions

View File

@@ -52,7 +52,7 @@ public class MachineProcess extends iDBObject {
userWorkspace = p.userWorkspace;
testingSystemRoot = p.testingSystemRoot;
}
public String getUniqueKey(){
public String getUniqueKey() {
Vector<String> res = new Vector<>();
res.add(machineAddress);
res.add(String.valueOf(machinePort));
@@ -63,11 +63,22 @@ public class MachineProcess extends iDBObject {
public File getWorkspace() {
return new File(Global.MachinesDirectory, String.valueOf(id));
}
public File getStartedFile() {
return new File(getWorkspace(), Constants.STARTED);
}
public File getAbortedFile() {
return new File(getWorkspace(), Constants.ABORTED);
}
//---
public boolean isAborted() {
File aborted = getAbortedFile();
return aborted.exists();
}
public boolean isStarted() {
File started = getStartedFile();
return started.exists();
}
//--
public void Start() {
try {
File workspace = getWorkspace();
@@ -85,19 +96,15 @@ public class MachineProcess extends iDBObject {
args.add(Utils.DQuotes(machinePort));
args.add(Utils.DQuotes(userName));
args.add(Utils.DQuotes(userPassword));
args.add(Utils.DQuotes(userWorkspace));
args.add(Utils.DQuotes(testingSystemRoot));
//--
//подготовка пакетного режима. Запустит его уже очередь.
Utils.createScript(workspace, workspace,
Utils.startScript(workspace, workspace,
"start",
"java -jar VisualSapfor.jar " + String.join(" ", args));
//---
} catch (Exception ex) {
ex.printStackTrace();
}
}
//---
public boolean isAborted() {
File aborted = getAbortedFile();
return aborted.exists();
}
}