Submit all LeafInputFiles together
This commit is contained in:
@@ -31,25 +31,25 @@ namespace LeafWeb.Web.Services
|
||||
public EmailNotificationService() : this(new DataService())
|
||||
{ }
|
||||
|
||||
public void SendLeafWebError(int leafWebFileId, string errorMessage)
|
||||
public void SendLeafWebError(int leafInputId, string errorMessage)
|
||||
{
|
||||
var file = _dataService.GetLeafInputFile(leafWebFileId);
|
||||
var body = $"Your LeafWeb analysis job, {file.LeafInput.Identifier} (with filename {file.Filename}), encountered the following errors." + Environment.NewLine
|
||||
var leafInput = _dataService.GetLeafInput(leafInputId);
|
||||
var body = $"Your LeafWeb analysis job, {leafInput.Identifier}, encountered the following errors." + Environment.NewLine
|
||||
+ "You will need to correct your input and resubmit." + Environment.NewLine + Environment.NewLine
|
||||
+ errorMessage;
|
||||
var message = new MailMessage(_emaialFromAddress, file.LeafInput.Email, "LeafWeb processing error", body);
|
||||
var message = new MailMessage(_emaialFromAddress, leafInput.Email, "LeafWeb processing error", body);
|
||||
SendMessage(message);
|
||||
}
|
||||
|
||||
public void SendLeafWebSuccess(int leafWebFileId)
|
||||
public void SendLeafWebSuccess(int leafInputId)
|
||||
{
|
||||
var file = _dataService.GetLeafInputFile(leafWebFileId);
|
||||
var body = $"Your LeafWeb analysis job, {file.LeafInput.Identifier} (with filename {file.Filename}), has completed." + Environment.NewLine;
|
||||
var message = new MailMessage(_emaialFromAddress, file.LeafInput.Email, "LeafWeb results", body);
|
||||
var leafInput = _dataService.GetLeafInput(leafInputId);
|
||||
var body = $"Your LeafWeb analysis job, {leafInput.Identifier}, has completed." + Environment.NewLine;
|
||||
var message = new MailMessage(_emaialFromAddress, leafInput.Email, "LeafWeb results", body);
|
||||
|
||||
var fileStreams =
|
||||
(from outputFile in
|
||||
file.LeafOutputFiles
|
||||
leafInput.OutputFiles
|
||||
select Tuple.Create(outputFile, new MemoryStream(outputFile.Contents))).ToList();
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user