forked from mtusi2026/mtusi2026lab5
feat(worker): add versioned image processing
This commit is contained in:
+2
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user