taskQueue method

TaskQueue taskQueue(
  1. String functionName, {
  2. @Deprecated('Use scope instead. Will be removed in a future major version.') String? extensionId,
  3. FunctionScope? scope,
})

Creates a reference to a task queue for the given function.

The functionName can be:

  1. A fully qualified function resource name: projects/{project}/locations/{location}/functions/{functionName}
  2. A partial resource name with location and function name: locations/{location}/functions/{functionName}
  3. Just the function name (uses default location us-central1): {functionName}

The optional extensionId is used for Firebase Extension functions.

Example:

final functions = FirebaseApp.instance.functions;
final queue = functions.taskQueue('myFunction');
await queue.enqueue({'data': 'value'});

Implementation

TaskQueue taskQueue(
  String functionName, {
  @Deprecated('Use scope instead. Will be removed in a future major version.')
  String? extensionId,
  FunctionScope? scope,
}) {
  return TaskQueue._(
    functionName: functionName,
    requestHandler: _requestHandler,
    extensionId: extensionId,
    scope: scope,
  );
}