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(
11991199 * Unique identifier of a task.
12001200 * @param pushTaskPayload
12011201 * 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.
12021205 */
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 {
12061212 requireNotNull(taskID, " Parameter `taskID` is required when calling `pushTask`." )
12071213 requireNotNull(pushTaskPayload, " Parameter `pushTaskPayload` is required when calling `pushTask`." )
12081214
@@ -1211,6 +1217,7 @@ class IngestionClient(
12111217 .withMethod(" POST" )
12121218 .withPath(s " /2/tasks/ ${escape(taskID)}/push " )
12131219 .withBody(pushTaskPayload)
1220+ .withQueryParameter(" watch" , watch)
12141221 .build()
12151222 execute[RunResponse ](request, requestOptions)
12161223 }
You can’t perform that action at this time.
0 commit comments