修改
This commit is contained in:
@@ -109,6 +109,10 @@ public partial class MySqlDestination : IDisposable, IAsyncDisposable
|
||||
var sb = new StringBuilder();
|
||||
foreach (var (tableName, records) in tableRecords)
|
||||
{
|
||||
if (tableName == "order_process_step")
|
||||
{
|
||||
var a = 1;
|
||||
}
|
||||
if (records.Count == 0)
|
||||
continue;
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
namespace ConsoleApp2.Services;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace ConsoleApp2.Services;
|
||||
|
||||
/// <summary>
|
||||
/// 处理上下文类,标识处理进度
|
||||
@@ -8,7 +10,8 @@ public class ProcessContext
|
||||
private int _inputCount;
|
||||
private int _transformCount;
|
||||
private int _outputCount;
|
||||
private IList<Exception> _exceptionList = new List<Exception>();
|
||||
private int _finishedTaskCount;
|
||||
private ConcurrentBag<Exception> _exceptionList = new ConcurrentBag<Exception>();
|
||||
public bool IsInputCompleted { get; private set; }
|
||||
public bool IsTransformCompleted { get; private set; }
|
||||
public bool IsOutputCompleted { get; private set; }
|
||||
@@ -34,7 +37,13 @@ public class ProcessContext
|
||||
{
|
||||
_exceptionList.Add(ex);
|
||||
}
|
||||
public IList<Exception> GetExceptions()
|
||||
|
||||
public void AddFinishTask() => Interlocked.Increment(ref _finishedTaskCount);
|
||||
public int FinishTaskCount
|
||||
{
|
||||
get => _finishedTaskCount;
|
||||
}
|
||||
public ConcurrentBag<Exception> GetExceptions()
|
||||
{
|
||||
return _exceptionList;
|
||||
}
|
||||
|
Reference in New Issue
Block a user