Add batch scan processing endpoints#215
Draft
jakebromberg wants to merge 1 commit intofeature/scanner-gemini-integrationfrom
Draft
Add batch scan processing endpoints#215jakebromberg wants to merge 1 commit intofeature/scanner-gemini-integrationfrom
jakebromberg wants to merge 1 commit intofeature/scanner-gemini-integrationfrom
Conversation
Introduces POST /library/scan/batch and GET /library/scan/batch/:jobId endpoints that let DJs upload multiple vinyl record images in one request, get a job ID back immediately (202 Accepted), and poll for results as each item processes asynchronously through Gemini. Schema: scan_jobs and scan_results tables with status enums, cascading deletes, and JSONB columns for context/extraction data. Batch service: createBatchJob (insert + fire-and-forget background processing), getJobStatus (ownership-checked polling), processJobItems (sequential per-item processing with partial failure handling). Validation: max 10 items, max 5 images per item, max 50 total images, manifest image count must match uploaded files.
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.
Summary
POST /library/scan/batchendpoint for uploading multiple vinyl record images with a JSON manifest, returning 202 with a job ID for pollingGET /library/scan/batch/:jobIdendpoint for checking job status with ownership-enforced accessscan_jobsandscan_resultsdatabase tables with status enums, cascading deletes, and JSONB columnsCloses #214
Test plan