- Remove the no-op Worker BackgroundService and its registration; the process is kept alive and does its work through the MassTransit bus and the upload intent jobs (their own hosted services) - Fix the gateway middleware guard to reject on string.IsNullOrEmpty(prefix) instead of 'is null', which no longer matched TicketValidator returning string.Empty for invalid tickets (invalid tickets skipped the 401 and an empty object key could slip through) Build: 0 warnings, 0 errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
24 lines
912 B
C#
24 lines
912 B
C#
using Musify.Application.Configuration;
|
|
using Musify.Infrastructure.MassTransit;
|
|
using Musify.Infrastructure.Persistence;
|
|
using Musify.Infrastructure.Services;
|
|
|
|
var builder = Host.CreateApplicationBuilder();
|
|
|
|
var configuration = builder.Configuration;
|
|
|
|
var services = builder.Services;
|
|
|
|
services.AddValidatedOptions<ApplicationStorageConfiguration>(configuration, ApplicationStorageConfiguration.SectionName);
|
|
services.AddValidatedOptions<PlayListConfiguration>(configuration, PlayListConfiguration.SectionName);
|
|
services.AddValidatedOptions<TrackConfiguration>(configuration, TrackConfiguration.SectionName);
|
|
services.AddStorageService(configuration);
|
|
services.AddAudioTranscoder(configuration);
|
|
services.AddPictureService(configuration);
|
|
services.AddDatabase(configuration);
|
|
services.AddMassTransitConsumers(configuration);
|
|
services.AddUploadIntentJobs(configuration);
|
|
|
|
var host = builder.Build();
|
|
|
|
host.Run(); |