createQueue method

Future<Queue> createQueue(
  1. CreateQueueRequest request
)

Creates a queue.

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> createQueue(CreateQueueRequest request) async {
  final url = _endPoint.replace(path: '/v2/${request.parent}/queues');
  final response = await _client.post(url, body: request.queue);
  return Queue.fromJson(response);
}