Files
CherryHQ-cherry-studio/docs/references
fullex 458fb42054 feat(job): typed settled events, list filters, and transactional enqueue
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
2026-07-04 05:14:14 -07:00
..