Files
vfxreview/RenderWorker/VFXReviewWorker/Program.cs
twotalesanimation 477aef7b27
Deploy / deploy (push) Successful in 3m25s
feat(worker): upload status in the job log, ProRes uploaded in the background
Preview jobs looked stuck after aerender finished: the worker was silently
uploading the review MP4s and the ProRes MOV over a slow uplink, and a
restart mid-upload threw the preview away.

- Worker 1.7.1 replaces the job's log tail with live upload status and logs
  each upload's size, duration and speed.
- The ProRes MOV now uploads after finalize via a persistent queue
  (HighResUploader, resumes after restart, 5 attempts) and attaches through
  the new E13b endpoint POST /api/ext/render/jobs/{id}/attach-highres.
  A MOV from a superseded preview is discarded.

Deploy the server before the 1.7.1 worker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 18:13:23 +02:00

51 lines
2.0 KiB
C#

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using VFXReviewWorker;
// VFXReview RenderWorker (RenderPipeline2 §7) — Windows service driving
// aerender.exe on artist workstations / render nodes. All state flows through
// /api/ext/* with API-key auth; the worker never touches the database.
//
// Run interactively for debugging: VFXReviewWorker.exe [path\to\config.json]
// Install as a service: see RenderWorker/README.md
// Dry-run the validation engine over an existing render folder. No server, no
// config, no queue — useful for checking work that predates the pipeline.
if (args.Any(a => a.Equals("--validate", StringComparison.OrdinalIgnoreCase)))
{
return ValidateCommand.Run(args);
}
var configPath = args.FirstOrDefault(a => !a.StartsWith('-'));
// Install verification on a new machine — resolves paths, checks tools and
// pings the server, then exits. Never starts the service loop.
if (args.Any(a => a.Equals("--check", StringComparison.OrdinalIgnoreCase)))
{
return await Preflight.RunAsync(configPath);
}
var options = WorkerOptions.Load(configPath);
// Positional args (config path) are consumed above and deliberately not
// forwarded — the command-line configuration provider rejects bare tokens.
var builder = Host.CreateApplicationBuilder();
builder.Services.AddWindowsService(o => o.ServiceName = "VFXReviewRenderWorker");
builder.Logging.AddProvider(new FileLoggerProvider());
builder.Services.AddSingleton(options);
builder.Services.AddSingleton<ApiClient>();
builder.Services.AddSingleton<ReportSpooler>();
builder.Services.AddSingleton<HighResUploader>();
builder.Services.AddSingleton<AerenderRunner>();
builder.Services.AddSingleton<PreviewStage>();
builder.Services.AddSingleton<ValidationStage>();
builder.Services.AddSingleton<DeliveryStage>();
builder.Services.AddSingleton<BlenderRunner>();
builder.Services.AddSingleton<JobExecutor>();
builder.Services.AddHostedService<WorkerService>();
await builder.Build().RunAsync();
return 0;