improved
This commit is contained in:
@@ -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());
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user