cleanup: Remove unused ViewStreamDatabase config
This commit is contained in:
1 parent
9ff23db7a2
commit
f81dc08621
2 files changed
+6
-10
No files matched your search
@@ -3,19 +3,15 @@ namespace Bts.DataStreamCore.Services;
|
||||
using BCG;
|
||||
using BCG.Utilities.General;
|
||||
|
||||
using Bts.PubSub.Services;
|
||||
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
public static class DataStreamCoreServices {
|
||||
public static IServiceCollection AddPubTableBroker(this IServiceCollection services) =>
|
||||
services.AddSingleton<IPubTableBroker, PubTableBroker>();
|
||||
|
||||
public static IServiceCollection AddViewStreamDatabase(this IServiceCollection services, IConfiguration configurationSection) =>
|
||||
services.Configure<WorkerServiceConfig>(configurationSection)
|
||||
.AddSingleton<IWorker, ViewStreamDatabase>(sp => {
|
||||
ViewStreamDatabase.SetGlobalInstance(new ViewStreamDatabase(sp.GetRequiredService<ISubscriberCore>()));
|
||||
return ViewStreamDatabase.instance;
|
||||
});
|
||||
public static IServiceCollection AddViewStreamDatabase(this IServiceCollection services) =>
|
||||
services.AddSingleton<IWorker, ViewStreamDatabase>(sp => {
|
||||
ViewStreamDatabase.SetGlobalInstance(new ViewStreamDatabase(sp.GetRequiredService<ISubscriberCore>()));
|
||||
return ViewStreamDatabase.instance;
|
||||
});
|
||||
}
|
||||
@@ -15,7 +15,7 @@ public static class DataStreamPublisherServices {
|
||||
services.AddSpark(configurationSection.GetSection("Spark"))
|
||||
.AddSparkApi(configurationSection.GetSection("SparkApi"))
|
||||
.AddMasterWorker(configurationSection.GetSection("MasterWorker"))
|
||||
.AddViewStreamDatabase(configurationSection.GetSection("ViewStreamDatabase"))
|
||||
.AddViewStreamDatabase()
|
||||
.AddPubSubClient(configurationSection.GetSection("PubSub"))
|
||||
.AddPubTableBroker()
|
||||
.AddRemoteQueryManager()
|
||||
|
||||
Reference in new issue
Block a user