прогресс пакетов сапфор
This commit is contained in:
@@ -84,17 +84,32 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
}
|
||||
@Override
|
||||
protected boolean CheckNextState() throws Exception {
|
||||
boolean progress_changed = false;
|
||||
boolean state_changed = false;
|
||||
//--
|
||||
File workspace = testingPackage.getLocalWorkspace();
|
||||
//--
|
||||
File progress = new File(workspace, "progress");
|
||||
if (progress.exists()) {
|
||||
String s = FileUtils.readFileToString(progress);
|
||||
int current_progress = Integer.parseInt(s);
|
||||
if (current_progress != testingPackage.progress) {
|
||||
Print("progress changed: " + current_progress);
|
||||
testingPackage.progress = current_progress;
|
||||
progress_changed = true;
|
||||
}
|
||||
}
|
||||
//--
|
||||
File done = new File(workspace, Constants.DONE);
|
||||
File aborted = new File(workspace, Constants.ABORTED);
|
||||
if (done.exists()) {
|
||||
testingPackage.state = TasksPackageState.Analysis;
|
||||
return true;
|
||||
state_changed = true;
|
||||
} else if (aborted.exists()) {
|
||||
testingPackage.state = TasksPackageState.Aborted;
|
||||
return true;
|
||||
state_changed = true;
|
||||
}
|
||||
return false;
|
||||
return progress_changed || state_changed;
|
||||
}
|
||||
@Override
|
||||
protected void DownloadResults() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user