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 var configPath = args.FirstOrDefault(a => !a.StartsWith('-')); 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(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddHostedService(); await builder.Build().RunAsync();