mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-07-08 08:27:39 +08:00
Implements the accepted upstream items from issue 16738: - JobSettledEvent<TPayload> now carries typed input, parentId, and the final metadata (post-patchMetadata); JobContext gains parentId. Both are projections of the persisted snapshot - no extra DB reads. - JobListFilter.type widened to string | string[] (inArray), parentId filter added (rides job_parent_id_idx); ACTIVE_JOB_STATUSES exported from shared schemas replacing JobService's private copy; list/count WHERE composition extracted into a shared listConditions helper. - JobManager.enqueueTx(tx, ...) rides the caller's withWriteTx transaction so business writes and the job INSERT commit atomically; post-commit side effects are deferred one microtask and re-read the row (a rollback discards the resolver). JobService gains createTx / findActiveByIdempotencyKeyTx; enqueue is refactored onto the shared prepareEnqueue with unchanged external behavior. Refs #16738