mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-03-05 23:09:08 -05:00
try switch to db
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
using Infrastructure.Configuration;
|
||||
using System.IO;
|
||||
|
||||
namespace Executable.DependencyInjection;
|
||||
|
||||
public static class ConfigurationDI
|
||||
{
|
||||
public static IServiceCollection AddConfiguration(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
// We no longer configure options from appsettings.json
|
||||
// Instead, we rely solely on JSON configuration files
|
||||
|
||||
// Add JSON-based configuration services with Docker-aware path detection
|
||||
// and automatic caching with real-time change detection
|
||||
services.AddConfigurationServices();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ using Common.Configuration.General;
|
||||
using Data.Models.Arr;
|
||||
using Infrastructure.Health;
|
||||
using Infrastructure.Http;
|
||||
using Infrastructure.Verticals.DownloadClient.Factory;
|
||||
using Infrastructure.Verticals.DownloadClient.Deluge;
|
||||
using Infrastructure.Verticals.DownloadClient.QBittorrent;
|
||||
using Infrastructure.Verticals.DownloadClient.Transmission;
|
||||
@@ -22,7 +21,6 @@ public static class MainDI
|
||||
services
|
||||
.AddLogging(builder => builder.ClearProviders().AddConsole())
|
||||
.AddHttpClients(configuration)
|
||||
.AddConfiguration(configuration)
|
||||
.AddMemoryCache(options => {
|
||||
options.ExpirationScanFrequency = TimeSpan.FromMinutes(1);
|
||||
})
|
||||
@@ -113,9 +111,6 @@ public static class MainDI
|
||||
|
||||
private static IServiceCollection AddDownloadClientServices(this IServiceCollection services) =>
|
||||
services
|
||||
// Register the factory that creates download clients
|
||||
.AddSingleton<IDownloadClientFactory, DownloadClientFactory>()
|
||||
|
||||
// Register all download client service types
|
||||
// The factory will create instances as needed based on the client configuration
|
||||
.AddTransient<QBitService>()
|
||||
|
||||
@@ -26,8 +26,8 @@ public static class ServicesDI
|
||||
services
|
||||
.AddSingleton<IEncryptionService, AesEncryptionService>()
|
||||
.AddTransient<SensitiveDataJsonConverter>()
|
||||
.AddDbContext<EventsContext>()
|
||||
.AddDbContext<DataContext>()
|
||||
.AddTransient<EventsContext>()
|
||||
.AddTransient<DataContext>()
|
||||
.AddTransient<EventPublisher>()
|
||||
.AddHostedService<EventCleanupService>()
|
||||
// API services
|
||||
|
||||
Reference in New Issue
Block a user