mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 23:04:16 +01:00
fix services
This commit is contained in:
parent
db3784e795
commit
3cdaa53a65
2 changed files with 6 additions and 7 deletions
|
|
@ -108,9 +108,6 @@ namespace MareSynchronosServer
|
|||
options.EnableThreadSafetyChecks(false);
|
||||
}, mareConfig.GetValue("DbContextPoolSize", 1024));
|
||||
|
||||
|
||||
services.AddHostedService(provider => provider.GetService<SystemInfoService>());
|
||||
|
||||
services.AddAuthentication(options =>
|
||||
{
|
||||
options.DefaultScheme = SecretKeyGrpcAuthenticationHandler.AuthScheme;
|
||||
|
|
@ -143,13 +140,15 @@ namespace MareSynchronosServer
|
|||
opt.InstanceName = "MareSynchronos";
|
||||
});
|
||||
services.AddSingleton<IClientIdentificationService, DistributedClientIdentificationService>();
|
||||
services.AddHostedService(p => p.GetService<DistributedClientIdentificationService>());
|
||||
services.AddHostedService(p => p.GetService<IClientIdentificationService>());
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddSingleton<IClientIdentificationService, LocalClientIdentificationService>();
|
||||
services.AddHostedService(p => p.GetService<LocalClientIdentificationService>());
|
||||
services.AddHostedService(p => p.GetService<IClientIdentificationService>());
|
||||
}
|
||||
|
||||
services.AddHostedService(provider => provider.GetService<SystemInfoService>());
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
|
|
|
|||
|
|
@ -61,12 +61,12 @@ public class Startup
|
|||
opt.InstanceName = "MareSynchronos";
|
||||
});
|
||||
services.AddSingleton<IClientIdentificationService, DistributedClientIdentificationService>();
|
||||
services.AddHostedService(p => p.GetService<DistributedClientIdentificationService>());
|
||||
services.AddHostedService(p => p.GetService<IClientIdentificationService>());
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddSingleton<IClientIdentificationService, LocalClientIdentificationService>();
|
||||
services.AddHostedService(p => p.GetService<LocalClientIdentificationService>());
|
||||
services.AddHostedService(p => p.GetService<IClientIdentificationService>());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue