When fetching items, there is the chance that the query to GitHub times out because there is too much processing to do (there is a 10 seconds timeout from GitHub). In that case an easy fix is to retry but fetching less items at the time.
At some point an option was added (--num-entries) to mitigate this, but still if the timeout is reached depends on the nature of the query and the load of GitHub servers, so we need something more adaptative.
I think a better way to handle this would be to catch the exception and doing some sort of exponential back-off. Try first with the number passed by argument, if that fails with half of that and so on until there is only one item to fetch and if that fails too, then finally give up.
When fetching items, there is the chance that the query to GitHub times out because there is too much processing to do (there is a 10 seconds timeout from GitHub). In that case an easy fix is to retry but fetching less items at the time.
At some point an option was added (
--num-entries
) to mitigate this, but still if the timeout is reached depends on the nature of the query and the load of GitHub servers, so we need something more adaptative.I think a better way to handle this would be to catch the exception and doing some sort of exponential back-off. Try first with the number passed by argument, if that fails with half of that and so on until there is only one item to fetch and if that fails too, then finally give up.