addJobThrow method

  1. @override
void addJobThrow(
  1. AsyncJob job, {
  2. String? label,
  3. String? description,
  4. int retryTime = 1,
})

Add new job in to the queue

if the queue is closed, throw ClosedQueueException

Implementation

@override
void addJobThrow(
  AsyncJob job, {
  String? label,
  String? description,
  int retryTime = 1,
}) {
  if (isClosed) {
    throw ClosedQueueException("Closed Queue");
  } else {
    addJob(
      job,
      retryTime: retryTime,
      label: label,
      description: description,
    );
  }
}