From e003c186b89e6a2c9fd5db0c60c0751227593d26 Mon Sep 17 00:00:00 2001 From: XShine555 Date: Thu, 14 May 2026 22:15:26 +0200 Subject: [PATCH] Compilation fixes --- .../PlayLists/Handlers/CreatePlayListCommandHandler.cs | 1 - .../PlayLists/Handlers/UpdatePlayListCommandHandler.cs | 1 - .../Tracks/Handler/CreateTrackCommandHandler.cs | 1 - ...loadsCleanupJob.cs => TemporalUploadsCleanupJob.cs} | 10 +++++----- Infrastructure/Services/ServicesDependencyInjection.cs | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) rename Infrastructure/Jobs/{TempUploadsCleanupJob.cs => TemporalUploadsCleanupJob.cs} (84%) diff --git a/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs b/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs index 13e67e4..fe9620b 100644 --- a/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs +++ b/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs @@ -7,7 +7,6 @@ using Musify.Application.Contracts.Infrastructure; using Musify.Application.Events; using Musify.Application.PlayLists.Commands; using Musify.Application.PlayLists.Responses; -using Musify.Application.UploadIntents; using Musify.Application.Extensions; using Musify.Application.Services; using Musify.Domain.Entities; diff --git a/Application/PlayLists/Handlers/UpdatePlayListCommandHandler.cs b/Application/PlayLists/Handlers/UpdatePlayListCommandHandler.cs index e4e3464..c1952d8 100644 --- a/Application/PlayLists/Handlers/UpdatePlayListCommandHandler.cs +++ b/Application/PlayLists/Handlers/UpdatePlayListCommandHandler.cs @@ -7,7 +7,6 @@ using Musify.Application.Contracts.Infrastructure; using Musify.Application.Events; using Musify.Application.PlayLists.Commands; using Musify.Application.PlayLists.Responses; -using Musify.Application.UploadIntents; using Musify.Application.Extensions; using Musify.Application.Services; using Musify.Domain.Entities; diff --git a/Application/Tracks/Handler/CreateTrackCommandHandler.cs b/Application/Tracks/Handler/CreateTrackCommandHandler.cs index fc58123..9670714 100644 --- a/Application/Tracks/Handler/CreateTrackCommandHandler.cs +++ b/Application/Tracks/Handler/CreateTrackCommandHandler.cs @@ -7,7 +7,6 @@ using Musify.Application.Contracts.Infrastructure; using Musify.Application.Events; using Musify.Application.Tracks.Commands; using Musify.Application.Tracks.Responses; -using Musify.Application.UploadIntents; using Musify.Application.Extensions; using Musify.Application.Services; using Musify.Domain.Entities; diff --git a/Infrastructure/Jobs/TempUploadsCleanupJob.cs b/Infrastructure/Jobs/TemporalUploadsCleanupJob.cs similarity index 84% rename from Infrastructure/Jobs/TempUploadsCleanupJob.cs rename to Infrastructure/Jobs/TemporalUploadsCleanupJob.cs index 745b6bc..24b71f4 100644 --- a/Infrastructure/Jobs/TempUploadsCleanupJob.cs +++ b/Infrastructure/Jobs/TemporalUploadsCleanupJob.cs @@ -6,16 +6,16 @@ using Musify.Application.Configuration; namespace Musify.Infrastructure.Jobs { - public class TempUploadsCleanupJob( + public class TemporalUploadsCleanupJob( IServiceScopeFactory scopeFactory, - ILogger logger, + ILogger logger, ApplicationStorageConfiguration storageConfiguration, UploadIntentConfiguration uploadIntentConfiguration) : BackgroundService { protected override async Task ExecuteAsync(CancellationToken stoppingToken) { - logger.LogInformation("TempUploadsCleanupJob started (interval: {Interval}s, prefix: {Prefix})", + logger.LogInformation("TemporalUploadsCleanupJob started (interval: {Interval}s, prefix: {Prefix})", uploadIntentConfiguration.TempCleanupJobIntervalSeconds, uploadIntentConfiguration.TempRootPrefix); @@ -27,7 +27,7 @@ namespace Musify.Infrastructure.Jobs } catch (Exception exception) when (exception is not OperationCanceledException) { - logger.LogError(exception, "Error in TempUploadsCleanupJob"); + logger.LogError(exception, "Error in TemporalUploadsCleanupJob"); } await Task.Delay(TimeSpan.FromSeconds(uploadIntentConfiguration.TempCleanupJobIntervalSeconds), stoppingToken); @@ -64,7 +64,7 @@ namespace Musify.Infrastructure.Jobs } if (deleted > 0 || errors > 0) - logger.LogInformation("TempUploadsCleanupJob: deleted {Deleted} orphaned objects, {Errors} errors", deleted, errors); + logger.LogInformation("TemporalUploadsCleanupJob: deleted {Deleted} orphaned objects, {Errors} errors", deleted, errors); } } } diff --git a/Infrastructure/Services/ServicesDependencyInjection.cs b/Infrastructure/Services/ServicesDependencyInjection.cs index 04176c5..af6ed83 100644 --- a/Infrastructure/Services/ServicesDependencyInjection.cs +++ b/Infrastructure/Services/ServicesDependencyInjection.cs @@ -66,7 +66,7 @@ namespace Musify.Infrastructure.Services serviceDescriptors.AddUploadIntentConfiguration(configuration); serviceDescriptors.AddHostedService(); - serviceDescriptors.AddHostedService(); + serviceDescriptors.AddHostedService(); return serviceDescriptors; }