moved db init to start of service

This commit is contained in:
andy 2022-02-18 23:10:58 +00:00
parent 5b2e8d93e9
commit 3e359931f8

View File

@ -71,10 +71,12 @@ namespace Selector.CLI
Console.WriteLine("> Configuring..."); Console.WriteLine("> Configuring...");
// CONFIG // CONFIG
var config = ConfigureOptions(context, services); var config = ConfigureOptions(context, services);
services.AddHttpClient();
Console.WriteLine("> Adding Services..."); Console.WriteLine("> Adding Services...");
// SERVICES // SERVICES
services.AddHttpClient()
.ConfigureDb(config);
services.AddConsumerFactories(); services.AddConsumerFactories();
if (config.RedisOptions.Enabled) if (config.RedisOptions.Enabled)
{ {
@ -87,7 +89,6 @@ namespace Selector.CLI
.AddSpotify(); .AddSpotify();
services.ConfigureLastFm(config) services.ConfigureLastFm(config)
.ConfigureDb(config)
.ConfigureEqual(config); .ConfigureEqual(config);
if (config.RedisOptions.Enabled) if (config.RedisOptions.Enabled)