QueueWorkerConfig constructor

const QueueWorkerConfig({
  1. int? maxJobs,
  2. Duration delay = const Duration(seconds: 1),
  3. Duration? timeout,
  4. bool runInBackground = false,
  5. int concurrency = 1,
  6. Duration gracefulShutdownTimeout = const Duration(seconds: 30),
  7. void onError(
    1. dynamic error,
    2. StackTrace stack
    )?,
  8. void onJobStart(
    1. QueueJob job
    )?,
  9. void onJobComplete(
    1. QueueJob job,
    2. dynamic result
    )?,
  10. void onJobError(
    1. QueueJob job,
    2. dynamic error,
    3. StackTrace stack
    )?,
  11. void onShutdown()?,
  12. FailedJobHandler? failedJobHandler,
})

Implementation

const QueueWorkerConfig({
  this.maxJobs,
  this.delay = const Duration(seconds: 1),
  this.timeout,
  this.runInBackground = false,
  this.concurrency = 1,
  this.gracefulShutdownTimeout = const Duration(seconds: 30),
  this.onError,
  this.onJobStart,
  this.onJobComplete,
  this.onJobError,
  this.onShutdown,
  this.failedJobHandler,
});