From cd4585461b485f08c33da9adf7848f67259786b2 Mon Sep 17 00:00:00 2001 From: iPromKnight <156901906+iPromKnight@users.noreply.github.com> Date: Wed, 1 Jan 2025 14:15:58 +0000 Subject: [PATCH] fix: allow service registration when scrape is disabled --- .../Bootstrapping/ServiceCollectionExtensions.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Zilean.ApiService/Features/Bootstrapping/ServiceCollectionExtensions.cs b/src/Zilean.ApiService/Features/Bootstrapping/ServiceCollectionExtensions.cs index b6ff53d..1a21f45 100644 --- a/src/Zilean.ApiService/Features/Bootstrapping/ServiceCollectionExtensions.cs +++ b/src/Zilean.ApiService/Features/Bootstrapping/ServiceCollectionExtensions.cs @@ -21,12 +21,9 @@ public static IServiceCollection AddStartupHostedServices(this IServiceCollectio public static IServiceCollection ConditionallyRegisterDmmJob(this IServiceCollection services, ZileanConfiguration configuration) { - if (configuration.Dmm.EnableScraping) - { - services.AddTransient(); - services.AddTransient(); - services.AddSingleton(); - } + services.AddTransient(); + services.AddTransient(); + services.AddSingleton(); return services; }