Threaded ProcessWhiFitment

This commit is contained in:
2022-03-18 16:30:57 -04:00
parent 60edbee0b8
commit 98092543ab
3 changed files with 41 additions and 38 deletions

View File

@@ -108,7 +108,7 @@ namespace PartSource.Automation.Services
using SqlBulkCopy bulk = new SqlBulkCopy(connection)
{
DestinationTableName = $"FitmentTemp.{tableName}",
BulkCopyTimeout = 1
BulkCopyTimeout = 14400
};
bulk.WriteToServer(dataTable);
@@ -149,9 +149,11 @@ namespace PartSource.Automation.Services
connection.Open();
using SqlCommand command = new SqlCommand($"exec CreateFitmentView", connection);
command.CommandTimeout = 1800;
command.ExecuteNonQuery();
using SqlCommand command2 = new SqlCommand($"exec CreateFitmentIndexes", connection);
command.CommandTimeout = 1800;
command2.ExecuteNonQuery();
}