feat(server): render MP4 jobs no render node can take as MJPEG, and say so

BRIEF §14.7: the server falls back to managed formats when no node is
available and says so in the job log. An MP4 job waits for render nodes at
least the node timeout, then as long as an online node can encode its codec
at its size; after that the server's engine takes it and writes each output
it cannot encode as MJPEG in AVI at the same size and frame rate, with a job
log line. A job the server started resumes there. Selective acceptance is
asynchronous for that; when node availability cannot be read the job keeps
waiting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-03 09:39:17 +00:00
1 parent 1e255fb075
commit 4007293833
15 files changed
+247 -48

No files matched your search

+4 -4
View File
@@ -242,7 +242,7 @@ public sealed class JobEngine : IAsyncDisposable
Job? candidate = null;
foreach (var queued in await _db.Jobs.ListQueuedAsync(_selective.Keys, SelectiveWindow, cancellationToken).ConfigureAwait(false))
{
if (!Accepts(queued)) continue;
if (!await AcceptsAsync(queued, cancellationToken).ConfigureAwait(false)) continue;
candidate = queued;
break;
}
@@ -261,13 +261,13 @@ public sealed class JobEngine : IAsyncDisposable
}
/// <summary>A job its handler cannot judge is taken, so it fails here with its reason instead of blocking the queue.</summary>
private bool Accepts(Job job)
private async ValueTask<bool> AcceptsAsync(Job job, CancellationToken cancellationToken)
{
try
{
return _selective[job.Kind].Accepts(job);
return await _selective[job.Kind].AcceptsAsync(job, cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
catch (Exception ex) when (!(ex is OperationCanceledException && cancellationToken.IsCancellationRequested))
{
Log.Warning("jobs", $"{job.Kind} job {job.Id} could not be examined; it is claimed so that it fails with its reason", ex);
return true;