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")); var connection = new SqlConnection(_configuration.GetConnectionString("SQLDatabase"));
const string sql = """ const string sql = """
BACKUP DATABASE @databaseName BACKUP DATABASE @databaseName
TO DISK = @localDatabasePath TO DISK = @localDatabasePath
WITH FORMAT, WITH FORMAT,
MEDIANAME = @formatMediaName, MEDIANAME = @formatMediaName,
NAME = @formatName NAME = @formatName
"""; """;
connection.Open(); connection.Open();
var command = new SqlCommand(sql, connection); var command = new SqlCommand(sql, connection);

View File

@@ -71,7 +71,7 @@ public class T3SingleSourceProcessor(
throw new Exception($"DataSources are empty, {sourceImportWorker.Name}"); 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"); throw new Exception("No new data to process");
} }