Enhance JWT signing key validation and improve FfmpegBumperRenderer label handling: add checks for signing key length and placeholder values in DependencyInjection, and refactor label processing to read from files in FfmpegBumperRenderer. Update MediaProcessingBackgroundService to ensure slot release on claim failure.
This commit is contained in:
@@ -50,7 +50,21 @@ public sealed class MediaProcessingBackgroundService(
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
{
|
||||
await slots.WaitAsync(stoppingToken);
|
||||
var claim = await ClaimNextAsync(stoppingToken);
|
||||
|
||||
// Слот уже захвачен — любой сбой захвата ассета (транзиентная ошибка БД и т.п.)
|
||||
// обязан вернуть слот, иначе после нескольких ошибок семафор исчерпается и
|
||||
// диспетчер зависнет навсегда (сервис формально жив, но ничего не обрабатывает).
|
||||
(Guid Id, string Extension)? claim;
|
||||
try
|
||||
{
|
||||
claim = await ClaimNextAsync(stoppingToken);
|
||||
}
|
||||
catch
|
||||
{
|
||||
slots.Release();
|
||||
throw;
|
||||
}
|
||||
|
||||
if (claim is not { } job)
|
||||
{
|
||||
slots.Release();
|
||||
|
||||
Reference in New Issue
Block a user