目标数据库增加配置
This commit is contained in:
@@ -78,7 +78,7 @@ public class TransformService : ITransformService
|
||||
record[i] = field;
|
||||
}
|
||||
//过滤不要的record
|
||||
if ( await _options.Value.RecordFilter?.Invoke(record,_db) == false) continue;
|
||||
//if ( await _options.Value.RecordFilter?.Invoke(record,_db) == false) continue;
|
||||
record.Database = _options.Value.DatabaseFilter?.Invoke(record);
|
||||
//修改record
|
||||
_options.Value.RecordModify?.Invoke(record);
|
||||
@@ -91,6 +91,7 @@ public class TransformService : ITransformService
|
||||
record = replaceRecord;
|
||||
}
|
||||
_consumerQueue.Enqueue(record);
|
||||
_context.AddTransform();
|
||||
//数据增加
|
||||
var addRecords=_options.Value.RecordAdd?.Invoke(record);
|
||||
if(addRecords != null&& addRecords.Count>0)
|
||||
@@ -98,9 +99,9 @@ public class TransformService : ITransformService
|
||||
foreach(var rc in addRecords)
|
||||
{
|
||||
_consumerQueue.Enqueue(rc);
|
||||
_context.AddTransform();
|
||||
}
|
||||
}
|
||||
_context.AddTransform();
|
||||
}
|
||||
|
||||
_context.CompleteTransform();
|
||||
|
Reference in New Issue
Block a user