cleanup(worker): drop empty Worker BackgroundService; fix gateway ticket guard

- 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.
This commit is contained in:
2026-07-05 22:13:20 +02:00
parent d8127230a7
commit 3653a350a7
3 changed files with 1 additions and 13 deletions
-3
View File
@@ -2,7 +2,6 @@ using Musify.Application.Configuration;
using Musify.Infrastructure.MassTransit;
using Musify.Infrastructure.Persistence;
using Musify.Infrastructure.Services;
using Musify.Worker;
var builder = Host.CreateApplicationBuilder();
@@ -20,8 +19,6 @@ services.AddDatabase(configuration);
services.AddMassTransitConsumers(configuration);
services.AddUploadIntentJobs(configuration);
services.AddHostedService<Worker>();
var host = builder.Build();
host.Run();