diff --git a/ConsoleApp2/HostedServices/TransformService.cs b/ConsoleApp2/HostedServices/TransformService.cs index 3f67f6e..cd51c56 100644 --- a/ConsoleApp2/HostedServices/TransformService.cs +++ b/ConsoleApp2/HostedServices/TransformService.cs @@ -63,7 +63,7 @@ public class TransformService : ITransformService record = replaceRecord; } _consumerQueue.Enqueue(record); - _context.AddTransform(); + _context.AddTransform(); //数据增加 var addRecords=_options.Value.RecordAdd?.Invoke(record); if(addRecords != null&& addRecords.Count>0) @@ -74,6 +74,7 @@ public class TransformService : ITransformService _context.AddTransform(); } } + } _context.CompleteTransform(); diff --git a/ConsoleApp2/Services/MySqlDestination.cs b/ConsoleApp2/Services/MySqlDestination.cs index 6df1977..d4f89e8 100644 --- a/ConsoleApp2/Services/MySqlDestination.cs +++ b/ConsoleApp2/Services/MySqlDestination.cs @@ -61,7 +61,7 @@ public class MySqlDestination : IDisposable, IAsyncDisposable { cmd.CommandText = insertSql; await cmd.ExecuteNonQueryAsync(); - _logger.LogInformation(@"do insert completed!size:{Length}", cmd.CommandText.Length); + } _recordCache.Clear(); }