Оптимизация команды Exists для SSH
This commit is contained in:
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
String pathRes("results");
|
||||
Utils::Mkdir(pathRes);
|
||||
//string buf;
|
||||
string buf;
|
||||
|
||||
while (activeTasks) {
|
||||
long oldActiveTasks = activeTasks;
|
||||
@@ -174,7 +174,7 @@ 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";
|
||||
buf += to_string(task->getId()) + " " + string(task->printState().getCharArray()) + " " + to_string(task->getTotalTime()) + "\n";
|
||||
task->copyResults(pathRes);
|
||||
continue;
|
||||
}
|
||||
@@ -187,10 +187,10 @@ public:
|
||||
|
||||
changeState();
|
||||
|
||||
//String outFile(pathRes + "/info.txt");
|
||||
//File tmp(outFile, String(buf.c_str()));
|
||||
String outFile(pathRes + "/info.txt");
|
||||
File tmp(outFile, String(buf.c_str()));
|
||||
|
||||
Utils::ZipFolder(pathRes, pathRes + ".zip");
|
||||
//Utils::ZipFolder(pathRes, pathRes + ".zip");
|
||||
}
|
||||
|
||||
virtual void Finalize() { }
|
||||
|
||||
@@ -201,10 +201,10 @@ public:
|
||||
virtual String copyResults(const String& pathRes) {
|
||||
String resultPath(packageWorkspace + "/" + pathRes + "/" + getId());
|
||||
Utils::Mkdir(resultPath);
|
||||
Utils::Copy(workspace + "/TaskState", resultPath + "/TaskState");
|
||||
//Utils::Copy(workspace + "/TaskState", resultPath + "/TaskState");
|
||||
Utils::Copy(workspace + "/out.txt", resultPath + "/out.txt");
|
||||
Utils::Copy(workspace + "/err.txt", resultPath + "/err.txt");
|
||||
Utils::Copy(workspace + "/total_time", resultPath + "/total_time");
|
||||
//Utils::Copy(workspace + "/total_time", resultPath + "/total_time");
|
||||
return resultPath;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user