radar / elastic

A thin veneer over HTTPotion that talks to Elastic Search
https://hex.pm/packages/elastic
MIT License
65 stars 22 forks source link

Scroller GenServer call timeouts #27

Closed twix14 closed 4 years ago

twix14 commented 4 years ago

Hi,

I've found a problem with the Scroller implementation.

GenServer's default timeout for every call function is 5000 (5 sec), that value is used in the Scroller by default and there's currently no way of changing it. Meaning that, when you ask for the next_page and the Scroll.next() takes longer than 5 seconds the Scroller will crash with a timeout.

This can be fixed by placing the HTTP timeout env in the next_page call, which will then change the timeout value for it.

I can work on a pull request if needed.

radar commented 4 years ago

Yes please.