整理代码
This commit is contained in:
@@ -54,20 +54,22 @@ public class OutputService : IOutputService
|
||||
}
|
||||
if (_context.GetExceptions().Count>0)
|
||||
{
|
||||
_logger.LogInformation("***** Csv output service is canceled *****");
|
||||
_logger.LogInformation("***** Csv output thread is canceled *****");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (_context.IsTransformCompleted && records.Count > 0)
|
||||
if (records.Count > 0)
|
||||
{
|
||||
await FlushAsync(records);
|
||||
records.Clear();
|
||||
_context.CompleteOutput();
|
||||
_logger.LogInformation("***** Mysql output service completed *****");
|
||||
_logger.LogInformation("***** Mysql output thread completed *****");
|
||||
}
|
||||
}, _options.Value.TaskCount);
|
||||
|
||||
await _taskManager.WaitAll();
|
||||
//_context.CompleteOutput();
|
||||
_logger.LogInformation(@"***** Mysql output service completed *****");
|
||||
|
||||
}
|
||||
|
||||
private async Task FlushAsync(IEnumerable<DataRecord> records)
|
||||
|
Reference in New Issue
Block a user