adt-apjc / YAP

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Add timeout option to Rest command #185

Closed marumer closed 9 months ago

marumer commented 9 months ago

Currently there is no option to block a loop, except by modifying the variable states. Using commands for configuration increase the risk of loops in the application

marumer commented 9 months ago

Image

marumer commented 9 months ago

https://axios-http.com/docs/cancellation

Setting the timeout property in an axios call handles response related timeouts.

In some cases (e.g. network connection becomes unavailable) an axios call would benefit from cancelling the connection early. Without cancellation, the axios call can hang until the parent code/stack times out (might be a few minutes in a server-side applications). Should be 2 minutes using the http module

To terminate an axios call you can use following methods:

marumer commented 9 months ago

failure to reduce the response wait using by passing the timeout parameter to the axis call (and remap it in the backend proxy call)