восстановил возможность оповещения о ходе тестирования по почте ( в ходе редизайна пропадала)

This commit is contained in:
2023-10-17 22:25:10 +03:00
parent cbaa99345b
commit 07d35c876d
10 changed files with 47 additions and 44 deletions

View File

@@ -43,6 +43,10 @@ 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() {
@@ -215,23 +219,17 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
protected TestingPlanner testingPlanner = new TestingPlanner();
protected Thread testingThread = new Thread(() -> testingPlanner.Perform());
//------>>>
public static boolean checkTasks = false;
//--
public static void switchTimer(boolean on) {
if (on)
TimerOn();
else
TimerOff();
}
//----
public static int checkIntervalSecond = 10;
public static int kernels = 4;
//----
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();
// Pass_2021.passes.get(PassCode_2021.ActualizePackages).Do();
Pass_2021.passes.get(PassCode_2021.SynchronizeTestsTasks).Do();
});
checkTimer.start();
@@ -308,7 +306,6 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
groups.sort(Comparator.comparing(o -> o.description));
return groups;
}
@Override
protected void Session() throws Exception {
DBObject dbObject = null;