Remove cancelled layers from processors

This commit is contained in:
Michał Zieliński
2025-05-29 11:48:07 +02:00
parent d4044aa7b3
commit 72c6ff73ac
11 changed files with 28 additions and 26 deletions

View File

@@ -18,7 +18,7 @@ public class T3SingleSourceProcessor(
{
throw new Exception("SourceLayer record not found");
}
var sourceImportWorker = db.Layers.SingleOrDefault(x => x.Name == sourceLayer);
var sourceImportWorker = db.Layers.SingleOrDefault(x => x.Name == sourceLayer && !x.IsDeleted && !x.IsCancelled);
if (sourceImportWorker == null)
{
throw new Exception("SourceImportWorkerL layer not found");
@@ -61,7 +61,7 @@ public class T3SingleSourceProcessor(
var dataSources = db.Layers
.Include(x => x.Records)
.Where(x => x.ParentId == sourceImportWorker.Id
&& !x.IsDeleted)
&& !x.IsDeleted && !x.IsCancelled)
.OrderBy(x => x.CreatedAt)
.AsNoTracking()
.ToList();