async_req
the async_req key can be used in order to run commands in an non-synchronic manner. By default when a command is submitted, the system awaits the client response. The async_req key allows to change this behavior and run multiple processes simultaneously.
Input
(Boolean) - True if not to wait for server response, False otherwise.
Example -
new_document= {"id": "131",
"name": "dave",
"age": 43}
hyperspace_client.update_document(body=new_document,
collection_name='partial_update',
async_req=True);Document doc = new Document();
doc.setId("131");
doc.putAdditionalProperty("name", "dave");
doc.putAdditionalProperty("age", 43);
boolean partialUpdate = true;
boolean docAsUpsert = true;
hyperspaceClient.updateDocument(new_document, collection_name, partialUpdate, docAsUpsert, async_req=True);const new_document= {"id": "131",
"name": "dave",
"age": 43}
const partialUpdate = true;
const docAsUpsert = true;
await hyperspaceClient.updateDocument(collectionName, new_document, async_req=True);In the above example, the document with the id corresponding to new_doc["id"] will be updated in a non synchronic manner.
Last updated