From e0df7ff4e9f4d9c780c4c7a4c40d92c4e8e514e3 Mon Sep 17 00:00:00 2001 From: lindj <67092759@qq.com> Date: Wed, 17 Jan 2024 11:53:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ConsoleApp2/HostedServices/TransformService.cs | 3 ++- ConsoleApp2/Services/MySqlDestination.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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(); }