обновление задач пакета одной операцией.
This commit is contained in:
@@ -36,14 +36,11 @@ import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import javafx.util.Pair;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.Timer;
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
import java.util.*;
|
||||
|
||||
import static Common.Constants.tests_db_name;
|
||||
public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
@@ -392,10 +389,29 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
RefreshDVMTests((Account) request.object, Integer.parseInt(request.arg));
|
||||
break;
|
||||
//--
|
||||
case UpdateTestTasks:
|
||||
Print("Обновить задачи на компиляцию и запуск");
|
||||
SetCurrentAccountDB(request.arg);
|
||||
UpdateTestTasks();
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
break;
|
||||
default:
|
||||
throw new RepositoryRefuseException("Неподдерживаемый код: " + code);
|
||||
}
|
||||
}
|
||||
public void UpdateTestTasks() throws Exception {
|
||||
Vector<TestCompilationTask> compilationTasks = (Vector<TestCompilationTask>) request.object;
|
||||
account_db.BeginTransaction();
|
||||
for (TestCompilationTask compilationTask : compilationTasks) {
|
||||
compilationTask.ChangeDate = new Date().getTime();
|
||||
account_db.Update(compilationTask);
|
||||
for (TestRunTask runTask : compilationTask.runTasks) {
|
||||
compilationTask.ChangeDate = new Date().getTime();
|
||||
account_db.Update(runTask);
|
||||
}
|
||||
}
|
||||
account_db.Commit();
|
||||
}
|
||||
//->>
|
||||
//->>
|
||||
Pair<Group, Vector<File>> ConvertDirectoryToGroup(File src, LanguageName languageName, TestType
|
||||
|
||||
Reference in New Issue
Block a user