SyncQueue class final
Runs jobs inline at push time (dev/test). processor is wired by the queue manager.
- Implemented types
Constructors
- SyncQueue()
- A queue that runs each job as soon as it is pushed.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The connection's name.
no setteroverride
-
processor
↔ Future<
void> Function(JobPayload payload, String queue)? -
Processes a payload immediately; set by
QueueManager.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → StateScope
-
Where the jobs live: one isolate, the process, or the cluster.
no setteroverride
Methods
-
clear(
String queue) → Future< int> -
Removes every job of
queueand returns how many there were.override -
delete(
QueuedJob job) → Future< void> -
Removes
jobfrom the queue for good.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
oldestWait(
String queue) → Future< Duration?> -
How long the oldest job that is ready to run on
queuehas been waiting (nullwhen none is waiting). Used by queue dashboards and auto-scaling (Laravel Horizon's "wait time").override -
pop(
String queue) → Future< QueuedJob?> -
Reserves the next available job on
queue(nullwhen empty).override -
push(
JobPayload payload, {required String queue, Duration? delay}) → Future< Object> -
Stores
payload; returns the driver's job id.override -
release(
QueuedJob job, Duration delay) → Future< void> -
Puts a reserved job back, available after
delay.override -
size(
String queue) → Future< int> -
The number of jobs waiting on
queue.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited