GFX-301c · Module 1

Batch Queue Design

4 min read

Batch generation is not "run the pipeline 50 times." It is a fundamentally different workflow that requires queue management, priority ordering, and dependency tracking. The batch queue holds all pending generation requests, each with a priority level, a style version reference, and a dependency chain (does this asset depend on another asset being approved first?).

The queue processes in priority order, not arrival order. A hero image for a landing page (P1) skips ahead of social media thumbnails (P3). Within the same priority, assets with dependencies process after their prerequisites — the campaign banner generates after the hero image because the banner references the hero's composition. Assets with no dependencies and equal priority can be parallelized — 5 social media thumbnails with the same style version can generate simultaneously.

The queue also enforces rate limits against the generation API. Most APIs throttle at 10-20 requests per minute. Submitting 50 requests at once produces 50 errors. The queue dispatches at the API's rate limit, tracks successes and failures, and automatically retries failures after a cooldown period.