DVQueueWorker class final

Works queues through DVQueues until told to stop.

Refuses to start rather than idling when it could never do anything: on the process-local queue a process gets when nothing configured an adapter, no other process can dispatch to it, and with no @DVJob.handler registered every job it reserved would be dead-lettered.

Constructors

DVQueueWorker({required List<String> queues, Duration idle = const Duration(seconds: 1), int batch = 50})

Properties

batch → int
The most jobs taken from one queue before the next queue gets a turn, so a flooded queue does not starve the others.
final
hashCode → int
The hash code for this object.
no setterinherited
idle → Duration
How long to wait after a pass that found nothing to do.
final
queues → List<String>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run({Future<void>? until, int? maxJobs}) → Future<int>
Runs until until completes, finishing the job in hand first, and returns how many jobs completed.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited