fix: service didn't use created singleton
This commit is contained in:
parent
955fe83c03
commit
63309db7d9
1 changed files with 2 additions and 1 deletions
|
@ -42,7 +42,8 @@ builder.Services.AddDbContextPool<WonderkingContext>(o =>
|
|||
builder.Services.AddSingleton<ILoggerFactory>(loggerFactory);
|
||||
builder.Services.AddSingleton<PacketDistributorService>();
|
||||
builder.Services.AddSingleton<ItemObjectPoolService>();
|
||||
builder.Services.AddHostedService<ItemObjectPoolService>();
|
||||
builder.Services.AddHostedService(provider =>
|
||||
provider.GetService<ItemObjectPoolService>() ?? throw new InvalidOperationException());
|
||||
builder.Services.AddHostedService(provider =>
|
||||
provider.GetService<PacketDistributorService>() ?? throw new InvalidOperationException());
|
||||
builder.Services.AddMassTransit(x =>
|
||||
|
|
Loading…
Reference in a new issue