The next due, uncancelled, undispatched job whose lease is absent or expired, leased to holder until now + ttlMs.
Records the dispatch for the lease's holder and answers whether a cancel arrived meanwhile (then the dispatcher tells
the bot to leave at once). A dispatch can outlive its lease and another holder can take the job: when holder no
longer holds the lease, or the job is gone, nothing is recorded and recorded is false.
Releases the holder's lease without dispatching (the dispatch failed and will be retried), moving the job's due time
to retryAt. False, and nothing changes, when holder no longer holds the lease or the job is gone.
Marks the job cancelled. already_dispatched when the bot is out: the caller tells it to leave instead. A job under a live lease is cancelled too, and its dispatcher learns it from markDispatched.
The run's job, or undefined when there is none.
Every dispatched job: what reconciliation compares with the providers' usage.
Dispatch jobs in memory, for tests and single-process hosts: its leases hold within one process.