Piscal Queue working more resilient to error

This commit is contained in:
2016-04-18 10:44:36 -04:00
parent 6623aa48ea
commit ca1a235c1d
21 changed files with 418 additions and 176 deletions
+5 -5
View File
@@ -74,7 +74,7 @@ namespace LeafWeb.Core.Remote
ssh.Disconnect();
if (command.ExitStatus != 0)
throw new PiscalClientException(command.Result);
throw new PiscalClientException(leafInput.LeafInputId, command.Result);
_logger.Debug("RunLeafInput result: " + command.Result);
}
@@ -93,7 +93,7 @@ namespace LeafWeb.Core.Remote
case StatusNotStarted:
return PiscalStatus.NotStarted;
default:
throw new PiscalClientException("Unknown status: " + statusRaw[0]);
throw new PiscalClientException(leafInput.LeafInputId, "Unknown status: " + statusRaw[0]);
}
}
@@ -108,7 +108,7 @@ namespace LeafWeb.Core.Remote
ssh.Disconnect();
if (command.ExitStatus != 0)
throw new PiscalClientException(command.Result);
throw new PiscalClientException(leafInput.LeafInputId, command.Result);
return command.Result
.SplitNewLine()
@@ -125,7 +125,7 @@ namespace LeafWeb.Core.Remote
// get output files
var status = GetLeafInputStatusRaw(leafInput);
if (status[0] != StatusComplete)
throw new PiscalClientException("output not available, status is " + status[0]);
throw new PiscalClientException(leafInput.LeafInputId, "output not available, status is " + status[0]);
var filePaths = status.Skip(1);
@@ -162,7 +162,7 @@ namespace LeafWeb.Core.Remote
ssh.Disconnect();
if (command.ExitStatus != 0)
throw new PiscalClientException(command.Error);
throw new PiscalClientException(leafInput.LeafInputId, command.Error);
}
}
}