create empty processed layers

This commit is contained in:
Michał Zieliński
2025-03-02 20:11:50 +01:00
parent 924e7acccb
commit c8e8fa6fc5
2 changed files with 7 additions and 7 deletions

View File

@@ -45,12 +45,12 @@ public class AdminController : Controller
var connection = new SqlConnection(_configuration.GetConnectionString("SQLDatabase"));
const string sql = """
BACKUP DATABASE @databaseName
TO DISK = @localDatabasePath
WITH FORMAT,
MEDIANAME = @formatMediaName,
NAME = @formatName
""";
BACKUP DATABASE @databaseName
TO DISK = @localDatabasePath
WITH FORMAT,
MEDIANAME = @formatMediaName,
NAME = @formatName
""";
connection.Open();
var command = new SqlCommand(sql, connection);

View File

@@ -71,7 +71,7 @@ public class T3SingleSourceProcessor(
throw new Exception($"DataSources are empty, {sourceImportWorker.Name}");
}
if (!dataSources.Any(x => x.CreatedAt > processedLayer.ModifiedAt))
if (!isNew && !dataSources.Any(x => x.CreatedAt > processedLayer.ModifiedAt))
{
throw new Exception("No new data to process");
}