Organize Piscal Service items
Add nlog, PiscalQueueManager modified: Core.Tests/Remote/PiscalSshClientTests.cs modified: Core/DAL/DataService.cs modified: Core/Remote/IPiscalClient.cs modified: Core/Remote/PiscalSshClient.cs new file: Web/Attributes/ActionLogAttribute.cs modified: Web/Controllers/ControllerBase.cs modified: Web/Controllers/LeafInputController.cs modified: Web/Controllers/LeafOutputController.cs new file: Web/NLog.config new file: Web/NLog.xsd new file: Web/Services/PiscalQueueManager.cs modified: Web/Services/PiscalService.cs modified: Web/Startup.cs modified: Web/Web.csproj modified: Web/packages.config Ignore logs Organize piscal queue manager modified: Core/Entities/LeafInputFile.cs modified: Web/Controllers/LeafInputController.cs renamed: Web/Startup.cs -> Web/HangfireStartup.cs modified: Web/Services/PiscalQueueManager.cs modified: Web/Web.csproj cleanup usings in leafinputcontroller
This commit is contained in:
+21
-9
@@ -56,7 +56,7 @@ namespace LeafWeb.Core.DAL
|
||||
_db.LeafInputs.Add(leafInput);
|
||||
foreach (var leafInputFile in leafInput.Files)
|
||||
{
|
||||
SetLeafInputFileStatusNoUpdate(leafInputFile, LeafInputStatusType.Added);
|
||||
SetLeafInputFileStatusNoUpdate(leafInputFile, LeafInputStatusType.Queued);
|
||||
}
|
||||
_db.SaveChanges();
|
||||
}
|
||||
@@ -104,14 +104,6 @@ namespace LeafWeb.Core.DAL
|
||||
UpdateLeafInputFile(leafInputFile);
|
||||
}
|
||||
|
||||
public LeafInputFile GetNextUnprocessedLeafInputFile()
|
||||
{
|
||||
return
|
||||
(from file in GetLeafInputFiles(LeafInputStatusType.Added)
|
||||
orderby file.Id ascending
|
||||
select file).FirstOrDefault();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Photosynthesis Types
|
||||
@@ -127,5 +119,25 @@ namespace LeafWeb.Core.DAL
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region LeafOutputFile
|
||||
|
||||
public void AddLeafOutputFile(LeafOutputFile leafOutput)
|
||||
{
|
||||
_db.LeafOutputFiles.Add(leafOutput);
|
||||
_db.SaveChanges();
|
||||
}
|
||||
|
||||
public IQueryable<LeafOutputFile> GetLeafOutputFiles()
|
||||
{
|
||||
return _db.LeafOutputFiles;
|
||||
}
|
||||
|
||||
public LeafOutputFile GetLeafOutputFile(int id)
|
||||
{
|
||||
return _db.LeafOutputFiles.Find(id);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user