File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/main/scala/algoliasearch/api Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1199,10 +1199,16 @@ class IngestionClient(
1199
1199
* Unique identifier of a task.
1200
1200
* @param pushTaskPayload
1201
1201
* Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
1202
+ * @param watch
1203
+ * When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished
1204
+ * before responding.
1202
1205
*/
1203
- def pushTask (taskID : String , pushTaskPayload : PushTaskPayload , requestOptions : Option [RequestOptions ] = None )(implicit
1204
- ec : ExecutionContext
1205
- ): Future [RunResponse ] = Future {
1206
+ def pushTask (
1207
+ taskID : String ,
1208
+ pushTaskPayload : PushTaskPayload ,
1209
+ watch : Option [Boolean ] = None ,
1210
+ requestOptions : Option [RequestOptions ] = None
1211
+ )(implicit ec : ExecutionContext ): Future [RunResponse ] = Future {
1206
1212
requireNotNull(taskID, " Parameter `taskID` is required when calling `pushTask`." )
1207
1213
requireNotNull(pushTaskPayload, " Parameter `pushTaskPayload` is required when calling `pushTask`." )
1208
1214
@@ -1211,6 +1217,7 @@ class IngestionClient(
1211
1217
.withMethod(" POST" )
1212
1218
.withPath(s " /2/tasks/ ${escape(taskID)}/push " )
1213
1219
.withBody(pushTaskPayload)
1220
+ .withQueryParameter(" watch" , watch)
1214
1221
.build()
1215
1222
execute[RunResponse ](request, requestOptions)
1216
1223
}
You can’t perform that action at this time.
0 commit comments