tagomoris / presto-client-node

Distributed query engine Presto client library for node.js
MIT License
126 stars 57 forks source link

Any chance of making checkInterval more dynamic? #32

Open prm-dan opened 4 years ago

prm-dan commented 4 years ago

This is a feature request. I'd like a way to configure this an exponential delay to this. E.g. first check after 20ms, then 40ms, then 80ms, etc.

tagomoris commented 4 years ago

That idea sounds acceptable. I'm ready to merge if someone creates a pull-request to support it. The very rough way to implement it is:

  1. change the interval from a fixed value to a function to provide the interval (return a fixed value always at first)
  2. add an argument to specify the function generator for that interval (if not specified, use the fixed interval)