feat(api): preprocess-images task endpoints (BE-3 part 3a)#484
Merged
Conversation
Expose the variant preprocessing queue (the engine from #481) over the protected /api/v1/preprocess-tasks routes, mirroring /api/v1/tasks: preview-count, runs, runs/:id, runs (create), runs/:id/kick, runs/:id/cancel, tick. Delegates to image-preprocess-service.ts; scope carries the `force` flag; surfaces "not configured" / "already active" / "no images" as 4xx. This is the drivable API the admin /tasks button and the CLI backfill (following) use to create and drain a backfill run; it also enables the real end-to-end backfill test once variant_storage is configured (#483). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BE-3 part 3a — preprocess task API endpoints
Exposes the variant preprocessing queue engine (merged in #481) over the protected
/api/v1/preprocess-tasksroutes, mirroring the existing/api/v1/tasks(metadata) endpoints:GET /preview-count,GET /runs,GET /runs/:id,POST /runs(create),POST /runs/:id/kick,POST /runs/:id/cancel,POST /tick.server/tasks/image-preprocess-service.ts.forceflag (normalizePreprocessTaskScope).tasks.This is the drivable API that BE-3 part 3b (the
/admin/tasksbutton) and part 3c (thepreprocess:backfillCLI) will use to create + drain a backfill run, and it's what enables the real end-to-end backfill test oncevariant_storageis set (#483).Verification
tsc --noEmit+eslintclean. Pure additive mirror of the reviewedhono/tasks.tspattern.🤖 Generated with Claude Code