This commit is contained in:
2023-12-03 22:11:15 +03:00
parent 7ac88bc689
commit 2b0f534f5d
3 changed files with 41 additions and 5 deletions

View File

@@ -177,6 +177,10 @@ public:
set<T*> activeTaskSet;
bool ignoreCheck = true;
String pathRes("results");
Utils::Mkdir(pathRes);
string buf;
while (activeTasks) {
long oldActiveTasks = activeTasks;
vector<int> emptyKeys;
@@ -223,6 +227,8 @@ public:
busyKernels -= task->getKernels();
printf(" done task with %d kernels and id %ld\n", task->getKernels(), task->getId());
buf += to_string(task->getId()) + " " + string(task->printState().getCharArray()) + " " + to_string(task->getTotalTime()) + "\n";
task->copyResults(pathRes);
continue;
}
it++;
@@ -233,14 +239,19 @@ public:
}
changeState();
String outFile(pathRes + "/info.txt");
File tmp(outFile, String(buf.c_str()));
Utils::ZipFolder(pathRes, pathRes + ".zip");
}
virtual void Finalize() {}
virtual void Finalize() { }
void saveState() {
Utils::Sleep(1); //чтобы не было одинаковых по дате файлов.
String stateFile = packageWorkspace + "/state/" + getStatePrefix() + printState();
//printf("stateFile=<%s>\n", stateFile.getCharArray());
File(stateFile, Utils::getDate());
File tmp(stateFile, Utils::getDate());
}
};