feat(collect): draft jobs, merged create UI, and unified start

Create collection jobs without auto-running; add /start for first run and re-run. Merge create form with filterable NE picker and selected list.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-28 10:36:47 +08:00
parent fed7f56ad0
commit f1ed4fe753
9 changed files with 343 additions and 147 deletions

View file

@ -67,8 +67,8 @@ def reconcile_stale_collection_job(db: Session, job_id: str) -> bool:
if st in _TERMINAL:
continue
if st == "pending":
# Pending while job is running means queued in the worker pool, not stuck.
if str(job.status or "") == "running":
# Pending while job is running/queued, or draft job not started yet.
if str(job.status or "") in ("running", "pending"):
continue
anchor = job.started_at or job.created_at
limit = pending_stale_sec