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