Оптимизация команды Exists для SSH
This commit is contained in:
@@ -42,15 +42,17 @@ public abstract class RemoteTaskSupervisor<T extends Task> extends TaskSuperviso
|
||||
}
|
||||
@Override
|
||||
protected void CheckTask() throws Exception {
|
||||
if (pass.Exists(getRemoteProject().full_name, Constants.DONE))
|
||||
RemoteFile DONE = new RemoteFile(getRemoteProject(), Constants.DONE);
|
||||
RemoteFile TIMEOUT = new RemoteFile(getRemoteProject(), Constants.TIMEOUT);
|
||||
if (pass.Exists(DONE))
|
||||
task.state = TaskState.Finished;
|
||||
else if (pass.Exists(getRemoteProject().full_name, Constants.TIMEOUT))
|
||||
else if (pass.Exists(TIMEOUT))
|
||||
task.state = TaskState.AbortedByTimeout;
|
||||
}
|
||||
@Override
|
||||
protected void AchieveResults() throws Exception {
|
||||
pass.tryGetSingleFile(getRemoteOutput(), task.getOutputFile(), 10240);
|
||||
pass.tryGetSingleFile(getRemoteErrors(), task.getErrorsFile(), 10240);
|
||||
pass.tryGetSingleFileWithMaxSize(getRemoteOutput(), task.getOutputFile(), 10240);
|
||||
pass.tryGetSingleFileWithMaxSize(getRemoteErrors(), task.getErrorsFile(), 10240);
|
||||
}
|
||||
@Override
|
||||
protected void AbortTask() throws Exception {
|
||||
@@ -58,7 +60,7 @@ public abstract class RemoteTaskSupervisor<T extends Task> extends TaskSuperviso
|
||||
}
|
||||
@Override
|
||||
protected void CalculatePerformanceTime() throws Exception {
|
||||
if (pass.tryGetSingleFile(getRemoteTime(), task.getTimeFile(), 0))
|
||||
if (pass.tryGetSingleFileWithMaxSize(getRemoteTime(), task.getTimeFile(), 0))
|
||||
task.RefreshTime();
|
||||
}
|
||||
protected String getStartCommand() {
|
||||
|
||||
Reference in New Issue
Block a user