feat: API endpoint for discovery reprocessing #449

Open
opened 2026-06-22 23:43:50 +02:00 by chris · 0 comments
Owner

Summary

Agent workflow currently requires direct DB manipulation to re-queue plant identification jobs for specific media items. This is fragile, undocumented, and not accessible from the UI.

Proposed Solution

Add POST /api/admin/discovery/reprocess endpoint:

{"domainKey": "plants_image", "mediaItemIds": ["uuid1", "uuid2"], "jobTypes": ["plant_identification"]}

Behavior:

  1. Cancel existing queued/failed jobs for the given domain + media items
  2. Re-queue fresh jobs through the normal worker job pipeline
  3. Return count of jobs created

UI Integration

Add a Re-identify button on the media detail page (owner only) that calls this endpoint.

Why

  • Agents currently use raw SQL: UPDATE worker_jobs SET status = queued
  • No way to trigger reprocessing from the UI
  • Owner should be able to request re-identification of specific photos
## Summary Agent workflow currently requires direct DB manipulation to re-queue plant identification jobs for specific media items. This is fragile, undocumented, and not accessible from the UI. ## Proposed Solution Add POST /api/admin/discovery/reprocess endpoint: {"domainKey": "plants_image", "mediaItemIds": ["uuid1", "uuid2"], "jobTypes": ["plant_identification"]} Behavior: 1. Cancel existing queued/failed jobs for the given domain + media items 2. Re-queue fresh jobs through the normal worker job pipeline 3. Return count of jobs created ## UI Integration Add a Re-identify button on the media detail page (owner only) that calls this endpoint. ## Why - Agents currently use raw SQL: UPDATE worker_jobs SET status = queued - No way to trigger reprocessing from the UI - Owner should be able to request re-identification of specific photos
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories#449
No description provided.