updateQueue method
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
Future<Queue> updateQueue(UpdateQueueRequest request) async {
final url = _endPoint.replace(
path: '/v2/${request.queue!.name}',
queryParameters: {
if (request.updateMask case final $1?) 'updateMask': $1.toJson(),
},
);
final response = await _client.patch(url, body: request.queue);
return Queue.fromJson(response);
}