systeminsights / retry-policy

Combinators for creating composable retry policies.
MIT License
0 stars 0 forks source link

retryOn(function(cb)) for a blocking retry #1

Open memelet opened 9 years ago

memelet commented 9 years ago

It would be nice to be able to wait for an event before retrying, rather than polling. For example, when no healthy services are returned from consul a blocking query on consul could be issued, and the policy be notified when there is a healthy service.

Not sure how this could fit into the current design though.

(This is low priority, as polling consul on localhost is not so bad.)

wemrysi commented 9 years ago

Would converting the long-poll call into a promise and using promise-contrib-retry to retry that promise until it succeeds achieve what you've described?