WorkerOptions class final
queue:work options.
Constructors
-
WorkerOptions({String? connection, List<
String> queues = const <String>['default'], int? tries, List<Duration> ? backoff, Duration? timeout, Duration sleep = const Duration(seconds: 3), int? maxJobs, Duration? maxTime, bool stopWhenEmpty = false}) -
How a worker runs: which queues, how long, how many jobs.
const
Properties
-
backoff
→ List<
Duration> ? -
The waits between attempts, overriding the jobs' own.
final
- connection → String?
-
The connection worked; the default one when null.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxJobs → int?
-
Stop after this many jobs (
--max-jobs).final - maxTime → Duration?
-
Stop after this long (
--max-time).final -
queues
→ List<
String> -
Queues polled in priority order.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sleep → Duration
-
How long to wait when the queue is empty.
final
- stopWhenEmpty → bool
-
Stop when the queue is empty (
--stop-when-empty).final - timeout → Duration?
-
How long one job may run.
final
- tries → int?
-
Overrides the job's
tries(null= use the job's own value).final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited