create empty processed layers
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user