feat(worker): add versioned image processing

This commit is contained in:
kk10
2026-11-16 22:06:11 +03:00
parent 6ba7db4b7d
commit 5442dfd3bc
5 changed files with 161 additions and 15 deletions
+2 -1
View File
@@ -31,6 +31,7 @@ var (
func main() {
maxPixels := flag.Int("process-image", 0, "process an image from stdin with the given pixel limit")
pipelineVersion := flag.Int("pipeline-version", 1, "pipeline version for process-image")
replay := flag.String("replay", "", "replay a failed attachment by UUID; requires retained staging and no existing variants")
operator := flag.String("operator", "", "operator requesting replay")
reason := flag.String("reason", "", "reason for replay")
@@ -38,7 +39,7 @@ func main() {
flag.Parse()
if *maxPixels > 0 {
if err := worker.ProcessImage(*maxPixels); err != nil {
if err := worker.ProcessImage(*maxPixels, *pipelineVersion); err != nil {
if errors.Is(err, worker.ErrInvalidSource) {
os.Exit(2)
}