feat: add enqueueMany, stats, jobTimeout, and fix dead-letter retention
enqueueMany(payloads, opts): bulk-inserts many plain jobs in a single createMany (one round-trip); wakes the poll loop on return. stats(): returns mutually-exclusive counts by state (pending, scheduled, processing, completed, dead) for monitoring/alerting on backlog depth and dead-letter accumulation. jobTimeout option (non-transactional mode only): per-job wall-clock cap. On expiry the job's signal is aborted (cooperative cancellation) and the attempt fails — retried or dead-lettered as usual. Backed by a dedicated per-job AbortController (#createJobAbort) that is linked to the queue-wide controller so stop() and per-job timeout both abort the signal, with cleanup() to detach the link once the job settles. Fix dead-letter retention: the "failure" value is removed from the deleteOn enum — dead-letters are now retained by default under "never" and "success" so the DLQ stays inspectable; only "always" (an explicit opt-out) also deletes dead-letters. The internal checks are updated accordingly.
O
Olivier Louvignes committed
4d64cbe5e1bba9436c1a6bffc97084dce2361d75
Parent: af197a7