updateQueue method

  1. @override
Future<Queue> updateQueue(
  1. UpdateQueueRequest request
)
override

Updates a queue.

This method creates the queue if it does not exist and updates the queue if it does exist.

Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not.

WARNING: Using this method may have unintended side effects if you are using an App Engine queue.yaml or queue.xml file to manage your queues. Read Overview of Queue Management and queue.yaml before using this method.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<Queue> updateQueue(UpdateQueueRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_updateQueue case final updateQueue?) {
    return updateQueue(request);
  }
  throw UnsupportedError('updateQueue');
}