fix(render-node): match job sizes per encoder; blank batch entries name no preset
A node announced one size limit, the largest of all its encoders (managed MJPEG at 65535 px), so it claimed H.264 jobs larger than its H.264 encoder takes. Each offered encoder now carries its own limit and the server matches codec and size per encoder; the node-wide limit is the largest offered one, for encoders that announce none. A hand-written batch with null or blank entries no longer throws when a job is posted or examined. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
6 files changed
+55
-15
No files matched your search
@@ -250,11 +250,16 @@ public sealed class RenderNodeService(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The node has an encoder for the job's codec and handles its resolution (0 = no announced limit).</summary>
|
||||
private static bool CanEncode(RegisterNodeRequest node, RenderJobParameters job) =>
|
||||
node.Encoders.Any(e => string.Equals(e.Codec, job.Codec, StringComparison.OrdinalIgnoreCase))
|
||||
&& (node.MaxWidth <= 0 || job.Width <= node.MaxWidth)
|
||||
&& (node.MaxHeight <= 0 || job.Height <= node.MaxHeight);
|
||||
/// <summary>
|
||||
/// The node has an encoder for the job's codec that handles its resolution: the encoder's own limit, else the node's
|
||||
/// (0 = no announced limit).
|
||||
/// </summary>
|
||||
internal static bool CanEncode(RegisterNodeRequest node, RenderJobParameters job) =>
|
||||
node.Encoders.Any(e => string.Equals(e.Codec, job.Codec, StringComparison.OrdinalIgnoreCase)
|
||||
&& Fits(job.Width, e.MaxWidth > 0 ? e.MaxWidth : node.MaxWidth)
|
||||
&& Fits(job.Height, e.MaxHeight > 0 ? e.MaxHeight : node.MaxHeight));
|
||||
|
||||
private static bool Fits(int size, int limit) => limit <= 0 || size <= limit;
|
||||
|
||||
internal static string? AppendLog(string? tail, string? line)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user