添加异常记录器,记录输出时发生异常的SQL;
This commit is contained in:
@@ -469,6 +469,7 @@ async Task RunProgram()
|
||||
options.TaskCount = commandOptions.TaskCount;
|
||||
options.FlushCount = commandOptions.FlushCount;
|
||||
});
|
||||
|
||||
host.Services.AddLogging(builder =>
|
||||
{
|
||||
builder.ClearProviders();
|
||||
@@ -484,6 +485,7 @@ async Task RunProgram()
|
||||
host.Services.AddKeyedSingleton<DataRecordQueue>(ProcessStep.Producer);
|
||||
host.Services.AddKeyedSingleton<DataRecordQueue>(ProcessStep.Consumer);
|
||||
host.Services.AddTransient<TaskManager>();
|
||||
host.Services.AddSingleton<ErrorRecorder>();
|
||||
|
||||
host.Services.AddHostedService<MainHostedService>();
|
||||
host.Services.AddHostedService<TaskMonitorService>();
|
||||
|
Reference in New Issue
Block a user