fix.убрал из общей(в перспективе библиотечной) части ссылки на частные объекты визуализатора
This commit is contained in:
@@ -61,10 +61,10 @@ public class MachineProcess extends DBObject {
|
||||
return new File(Global.MachinesDirectory, id);
|
||||
}
|
||||
public File getStartedFile() {
|
||||
return new File(getWorkspace(), Constants.STARTED);
|
||||
return new File(getWorkspace(), CommonConstants.STARTED);
|
||||
}
|
||||
public File getAbortedFile() {
|
||||
return new File(getWorkspace(), Constants.ABORTED);
|
||||
return new File(getWorkspace(), CommonConstants.ABORTED);
|
||||
}
|
||||
//---
|
||||
public boolean isAborted() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package _VisualDVM.TestingSystem.Common.TestingPackage;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.TestingSystem.Common.Configuration.Configuration;
|
||||
import _VisualDVM.TestingSystem.Common.Configuration.Json.ConfigurationsJson;
|
||||
import _VisualDVM.TestingSystem.Common.TasksPackageState;
|
||||
@@ -60,7 +60,7 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
return new File(getHomeDirectory(), String.valueOf(id));
|
||||
}
|
||||
public boolean isLoaded() {
|
||||
return new File(getLocalWorkspace(), Constants.LOADED).exists();
|
||||
return new File(getLocalWorkspace(), CommonConstants.LOADED).exists();
|
||||
}
|
||||
public abstract Class getJsonClass();
|
||||
public abstract File getHomeDirectory();
|
||||
@@ -68,7 +68,7 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
return new File(getLocalWorkspace(), "package_json");
|
||||
}
|
||||
public File getLoadedFile() {
|
||||
return new File(getLocalWorkspace(), Constants.LOADED);
|
||||
return new File(getLocalWorkspace(), CommonConstants.LOADED);
|
||||
}
|
||||
public void saveJson() throws Exception {
|
||||
Utils_.jsonToFile(package_json, getJsonFile());
|
||||
|
||||
@@ -2,7 +2,6 @@ package _VisualDVM.TestingSystem.Common;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Loggable;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||
@@ -67,7 +66,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
Print("serverName=" + serverName);
|
||||
Print("=====");
|
||||
//----
|
||||
Utils.createEmptyFile(Constants.STARTED);
|
||||
Utils.createEmptyFile(CommonConstants.STARTED);
|
||||
}
|
||||
//----
|
||||
protected void UpdatePackageState(TasksPackageState state_in) throws Exception {
|
||||
@@ -216,7 +215,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
}
|
||||
protected void Finalize(String reason) {
|
||||
Print(reason);
|
||||
File stateFile = new File(supervisorHome, Constants.ABORTED);
|
||||
File stateFile = new File(supervisorHome, CommonConstants.ABORTED);
|
||||
try {
|
||||
FileUtils.writeStringToFile(stateFile, reason);
|
||||
} catch (Exception ex) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.TestingSystem.Common.TaskThread;
|
||||
@@ -27,7 +28,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
FileUtils.writeStringToFile(PID, sapfor_drv.getName(), Charset.defaultCharset());
|
||||
//---
|
||||
Date startDate = new Date();
|
||||
File started = new File(Constants.STARTED);
|
||||
File started = new File(CommonConstants.STARTED);
|
||||
FileUtils.writeStringToFile(started, String.valueOf(startDate));
|
||||
//формирование списка задач.
|
||||
setMaxKernels(package_json.kernels);
|
||||
@@ -45,7 +46,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
//записать результаты всех задач.
|
||||
try {
|
||||
Utils_.jsonToFile(package_json, new File(Constants.package_json));
|
||||
FileUtils.writeStringToFile(new File(Constants.DONE), "");
|
||||
FileUtils.writeStringToFile(new File(CommonConstants.DONE), "");
|
||||
//--
|
||||
//Очистка
|
||||
//очистка служебных файлов.
|
||||
|
||||
@@ -102,7 +102,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
procBuilder.directory(workspace);
|
||||
procBuilder.start();
|
||||
//--->>
|
||||
File started = new File(workspace, Constants.STARTED);
|
||||
File started = new File(workspace, CommonConstants.STARTED);
|
||||
while (!started.exists()) {
|
||||
Print("waiting for package start...");
|
||||
Utils_.sleep(1000);
|
||||
@@ -128,8 +128,8 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
}
|
||||
}
|
||||
//--
|
||||
File done = new File(workspace, Constants.DONE);
|
||||
File aborted = new File(workspace, Constants.ABORTED);
|
||||
File done = new File(workspace, CommonConstants.DONE);
|
||||
File aborted = new File(workspace, CommonConstants.ABORTED);
|
||||
if (done.exists()) {
|
||||
testingPackage.state = TasksPackageState.Analysis;
|
||||
state_changed = true;
|
||||
@@ -154,10 +154,10 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
protected void Kill() throws Exception {
|
||||
File workspace = testingPackage.getLocalWorkspace();
|
||||
//----
|
||||
File interrupt_file = new File(workspace, Constants.INTERRUPT);
|
||||
File interrupt_file = new File(workspace, CommonConstants.INTERRUPT);
|
||||
//----
|
||||
FileUtils.writeStringToFile(interrupt_file, new Date().toString());
|
||||
File aborted_file = new File(workspace, Constants.ABORTED);
|
||||
File aborted_file = new File(workspace, CommonConstants.ABORTED);
|
||||
do {
|
||||
Print("waiting for interrupt...");
|
||||
Thread.sleep(1000);
|
||||
|
||||
Reference in New Issue
Block a user