You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added optional finishedTtlDays option on DelayedTaskServiceOptions. When set to a positive number, every record written to the FINISH bucket gets a Redis EX TTL of finishedTtlDays × 86400 seconds — successful tasks are auto-purged by Redis past that window. Disabled by default; never applies to PENDING / FAILED / CANCELED.
[1.0.0] - 2026-05-06
Pure-Redis storage. No MariaDB, no TypeORM, no entity, no migrations.
Four buckets per namespace: <NS>:PENDING:task-<id>, <NS>:FINISH:task-<id> (success), <NS>:FAILED:task-<id> (handler error / timeout / no handler), <NS>:CANCELED:task-<id> (replayable).
Auto-increment integer IDs via INCR <NS>:counter.
Polling scheduler (default 1000ms), processes pending tasks in ID order when scheduledAt <= now.
Weight-aware execution capped by maxWeight (default 5): a task starts only if Σ(running.weight) + task.weight <= maxWeight.
enqueue clamps weight to the live maxWeight. setWeight(id, weight) updates a still-pending task's weight (also clamped) — useful when maxWeight was lowered between deploys.
Typed dispatch: enqueue(definition, options) overload infers options.data from the TaskDefinition<P> generic. defineTask<P, R> already typed data inside run; this propagates the type all the way to the call site.
Cancelled or failed tasks can be replayed; replay(id) auto-detects the source bucket (CANCELED or FAILED) and accepts an optional future scheduledAt (otherwise keeps the original).
scheduledAt accepts Date, number (seconds from now), or string (ISO date or numeric seconds-from-now).
resolveScheduledAt exported as a public utility.
POC emitters accept scheduledAt and weight via query string.