整理代码

This commit is contained in:
2024-01-15 17:26:44 +08:00
parent 0984853c79
commit 78cd833617
7 changed files with 114 additions and 139 deletions

View File

@@ -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)