You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functionality should be added to all rest endpoints which allows timeouts to be specified, such that any request which takes longer than the timeout will be ignored and the promise returned will be realized with a default or user-specified value.
Currently, I think I should edit the defendpoint macro to include a :timeout and :timeout-value parameters. :timeout will be a number or channel, if a number it will create a timeout channel with that many milliseconds, otherwise it will be assumed to be a promise-chan which will yield an item when the timeout is reached.
The defendpoint functions will then spin up an additional go block which will take on that channel and upon receiving a value will put that value or :timeout-value onto the returned promise.
Additionally, make-request! should be updated to throw out a request if the :timeout channel can yield an item.
The text was updated successfully, but these errors were encountered:
Functionality should be added to all rest endpoints which allows timeouts to be specified, such that any request which takes longer than the timeout will be ignored and the promise returned will be realized with a default or user-specified value.
Currently, I think I should edit the
defendpoint
macro to include a:timeout
and:timeout-value
parameters.:timeout
will be a number or channel, if a number it will create a timeout channel with that many milliseconds, otherwise it will be assumed to be apromise-chan
which will yield an item when the timeout is reached.The
defendpoint
functions will then spin up an additional go block which will take on that channel and upon receiving a value will put that value or:timeout-value
onto the returned promise.Additionally,
make-request!
should be updated to throw out a request if the:timeout
channel can yield an item.The text was updated successfully, but these errors were encountered: