Cleanup logs
This commit is contained in:
@@ -471,37 +471,17 @@ public class LayersController : Controller
|
||||
{
|
||||
try
|
||||
{
|
||||
_logsController.AddEntry(new LogEntry
|
||||
{
|
||||
Title = $"Processing: {type}",
|
||||
Type = LogEntryType.Info,
|
||||
LogType = LogType.Process,
|
||||
CreatedAt = DateTime.UtcNow
|
||||
});
|
||||
|
||||
var processWorkerLayers = _db.Layers
|
||||
.Include(x => x.Records)
|
||||
.Where(x =>
|
||||
x.Records!.Any(y => y.Code == "Type" && y.Desc1 == "ProcessWorker") &&
|
||||
x.Records!.Any(y => y.Code == "IsEnabled" && y.Desc1 == "True") &&
|
||||
x.Records!.Any(y => y.Code == "ProcessType" && y.Desc1 == type)
|
||||
&& x.Number == 5586
|
||||
)
|
||||
.OrderBy(x => x.CreatedAt)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
|
||||
if (processWorkerLayers.Count == 0)
|
||||
{
|
||||
_logsController.AddEntry(new LogEntry
|
||||
{
|
||||
Title = "No Layers to process.",
|
||||
Type = LogEntryType.Info,
|
||||
LogType = LogType.Process,
|
||||
CreatedAt = DateTime.UtcNow
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var processWorker in processWorkerLayers)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user