Skip to main content
Indexing operations are asynchronous. When you send a request to add or update records, Algolia queues the operation and returns a taskID in the response. The task runs separately, depending on the server load. This helper method polls the Check task status API and stops if the task’s status is published.

Usage

var response = await client.WaitForTaskAsync("ALGOLIA_INDEX_NAME", 123L);

Parameters

  • C#
  • Dart
  • Go
  • Java
  • JavaScript
  • Kotlin
  • PHP
  • Python
  • Ruby
  • Scala
  • Swift
indexName
string
required
Index name where the task was executed.
taskId
long
required
Task ID to wait for.
maxRetries
int
default:50
Maximum number of retries for checking the status.
timeout
Func<int,int>
Returns a timeout based on the current number of iterations.
requestOptions
RequestOptions
Additional request options.
cancellationToken
CancellationToken
default:"default"
Parameter that can be used as a signal to cancel this request.
I