JoobQ::Delivery::Runtime
Inherits Reference < Object
One runtime owns its registry, resource budget, supervision and telemetry. Admission is explicit so legacy schedulers/middleware cannot acknowledge a tokenless processing list in place of a leased record.
Constructors
new(store : RedisStore, namespace : String, capacity : Int32 = 8, lease : Time::Span = 30.seconds, poll : Time::Span = 20.milliseconds, repair_every : Time::Span = 1.second, max_records : Int32 = 100000, optimized_delivery : Bool = true, telemetry : Telemetry | Nil = nil, execution_timeout : Time::Span = 5.minutes, production : Bool = true, batch_size : Int32 = 1)
SourceInstance methods
active_count
Sourceadmit(queue : String, request_id : String, payload : String, delay : Time::Span = Time::Span.zero, traceparent : String | Nil = Fiber.current.joobq_traceparent) : Admission
Sourceadmit_many(queue : String, requests : Array(Tuple(String, String)), delay : Time::Span = Time::Span.zero, traceparent : String | Nil = Fiber.current.joobq_traceparent) : Array(Admission)
Sourcebatch_size
Sourcecapacity
Sourceenqueue(queue : String, job : Job, request_id : String = job.jid.to_s) : Admission
Sourcelease
Sourceledger(queue : String) : Ledger
Sourcemetrics
Sourcenamespace
Sourceprometheus
Sourceregister(queue : String, &handler : String, Context -> Outcome) : Ledger
Sourceregister(queue : String, type : T.class) : Ledger forall T
A registered typed job gets immutable retry accounting from claim.attempt. Legacy retry/DLQ middleware is deliberately not invoked on leased jobs.
running?
Sourceserve(timeout : Time::Span = 15.seconds) : Drain
Sourcestart
Sourcestop(timeout : Time::Span = 15.seconds) : Drain
Stops ingress and claiming. At timeout, active contexts are cancelled. An already in-flight operation may finish, but token fencing prevents it from changing a successor's lease. Unsettled records remain recoverable. Active execution retains its worker slot until its actual fiber exits.
store
Sourceverify_durability!
Source