промежуточный. частичный рефакторинг смены глобальный настроек. автоотключение проверки бд тестов если активных пакетов нет.
This commit is contained in:
@@ -46,10 +46,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static TestingSystem.TasksDatabase.tests_db_name;
|
||||
public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
public static boolean email = false;
|
||||
public static boolean checkTasks = false;
|
||||
public static int checkIntervalSecond = 10;
|
||||
public static int kernels = 4;
|
||||
LinkedHashMap<String, TasksDatabase> accountsBases = new LinkedHashMap<>();
|
||||
//--------------------------------->>>
|
||||
public TestingServer() {
|
||||
@@ -233,17 +229,10 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
protected TestingPlanner testingPlanner = new TestingPlanner();
|
||||
protected Thread testingThread = new Thread(() -> testingPlanner.Perform());
|
||||
//------>>>
|
||||
public static void switchTimer(boolean on) {
|
||||
if (on)
|
||||
TimerOn();
|
||||
else
|
||||
TimerOff();
|
||||
}
|
||||
public static Timer checkTimer = null;
|
||||
public static void TimerOn() {
|
||||
checkTasks = true;
|
||||
checkTimer = new Timer(checkIntervalSecond * 1000, e -> {
|
||||
// Pass_2021.passes.get(PassCode_2021.ActualizePackages).Do();
|
||||
System.out.println("timer on");
|
||||
checkTimer = new Timer(Global.properties.CheckTestingIntervalSeconds * 1000, e -> {
|
||||
Pass_2021.passes.get(PassCode_2021.SynchronizeTestsTasks).Do();
|
||||
});
|
||||
checkTimer.start();
|
||||
@@ -252,7 +241,6 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
System.out.println("timer off");
|
||||
if (checkTimer != null)
|
||||
checkTimer.stop();
|
||||
checkTasks = false;
|
||||
}
|
||||
public static void ResetTimer() {
|
||||
TimerOff();
|
||||
@@ -397,8 +385,8 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
//1 - архивировать пакет.
|
||||
File packageArchive = sapforTasksPackage.getArchive();
|
||||
Utils.forceDeleteWithCheck(packageArchive);
|
||||
System.out.println("src = "+Utils.Brackets(sapforTasksPackage.workspace));
|
||||
System.out.println("dst="+Utils.Brackets(packageArchive.getAbsolutePath()));
|
||||
System.out.println("src = " + Utils.Brackets(sapforTasksPackage.workspace));
|
||||
System.out.println("dst=" + Utils.Brackets(packageArchive.getAbsolutePath()));
|
||||
//---
|
||||
ZipFolderPass zip = new ZipFolderPass();
|
||||
if (zip.Do(sapforTasksPackage.workspace, packageArchive.getAbsolutePath())) {
|
||||
|
||||
Reference in New Issue
Block a user