no message
This commit is contained in:
@@ -129,7 +129,7 @@ public class MachineQueueSupervisor extends TestingPlanner<DVMPackage> {
|
||||
protected void Print(String message) {
|
||||
try {
|
||||
if (isPrintOn()) {
|
||||
// System.out.println(message);
|
||||
// System.out.println(message);
|
||||
Global.Log.Print(message);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
@@ -140,7 +140,7 @@ public class MachineQueueSupervisor extends TestingPlanner<DVMPackage> {
|
||||
Print(reason);
|
||||
File stateFile = new File(supervisorHome, Constants.ABORTED);
|
||||
try {
|
||||
FileUtils.writeStringToFile(stateFile,reason);
|
||||
FileUtils.writeStringToFile(stateFile, reason);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -477,30 +477,20 @@ public class MachineQueueSupervisor extends TestingPlanner<DVMPackage> {
|
||||
packageLocalWorkspace = new File(Global.DVMPackagesDirectory, String.valueOf(testingPackage.id));
|
||||
}
|
||||
@Override
|
||||
public void Perform() {
|
||||
try {
|
||||
Print("Проверка сервера...");
|
||||
String currentServerName = (String) ServerCommand(ServerCode.GetServerName);
|
||||
Print("имя текущего сервера " + Utils.Brackets(currentServerName));
|
||||
Print("имя сервера, создавшего нить " + Utils.Brackets(serverName));
|
||||
if (!serverName.equals(currentServerName)){
|
||||
Finalize("Несоответствующий сервер");
|
||||
}
|
||||
Print("Запрос активных пакетов для машины "+Utils.Brackets(machine.getURL()));
|
||||
testingPackage = null;
|
||||
Vector<DVMPackage> activePackages = (Vector<DVMPackage>) ServerCommand(getActivePackagesCode(), machine.getURL(), null);
|
||||
if (activePackages.isEmpty())
|
||||
Finalize("Не найдено активных пакетов для машины "+Utils.Brackets(machine.getURL()));
|
||||
for (DVMPackage activePackage : activePackages)
|
||||
PerformPackage(activePackage);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Print("Exception occured");
|
||||
Print(ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
Print("sleep");
|
||||
Utils.sleep(getSleepMillis());
|
||||
public void perform() throws Exception {
|
||||
Print("Проверка сервера...");
|
||||
String currentServerName = (String) ServerCommand(ServerCode.GetServerName);
|
||||
Print("имя текущего сервера " + Utils.Brackets(currentServerName));
|
||||
Print("имя сервера, создавшего нить " + Utils.Brackets(serverName));
|
||||
if (!serverName.equals(currentServerName)) {
|
||||
Finalize("Несоответствующий сервер");
|
||||
}
|
||||
Print("Запрос активных пакетов для машины " + Utils.Brackets(machine.getURL()));
|
||||
testingPackage = null;
|
||||
Vector<DVMPackage> activePackages = (Vector<DVMPackage>) ServerCommand(getActivePackagesCode(), machine.getURL(), null);
|
||||
if (activePackages.isEmpty())
|
||||
Finalize("Не найдено активных пакетов для машины " + Utils.Brackets(machine.getURL()));
|
||||
for (DVMPackage activePackage : activePackages)
|
||||
PerformPackage(activePackage);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user