Тема: How to get messages for all my units at once?
Hi,
Is there a way to get all the messages for all my units at once?
Currently, I do a query for one unit at a time which is not ideal.
Thanks!
Вы не вошли. Пожалуйста, войдите или зарегистрируйтесь.
Hi,
Is there a way to get all the messages for all my units at once?
Currently, I do a query for one unit at a time which is not ideal.
Thanks!
Alex.Villalta, You can combine multiple requests in one batch https://sdk.wialon.com/wiki/en/sidebar/ … core/batch .
But if You have a lot of such units with thousands of messages it is not recommended to execute such heavy requests at once.
How would you implement it in Javascript ?
thanks!
Alex.Villalta, if You perform such requests in for loop - just add these lines before/after loop:
wialon.core.Remote.getInstance().startBatch("myBatch");
for (...) {
...
}
wialon.core.Remote.getInstance().finishBatch(function() {console.log("finished");}, "myBatch");