Sometimes grequests.map() returns responses which are either unsuccessful or simply None.
So far _wait_for_response() was retrying the whole request batch each time there was an unsuccessful response for any of the requests.
After this change only the requests that were unsuccessful will be called again in the next call to grequests.map().
Also some other aspects of handling the responses was changed:
if there are still some unsuccessful requests after max_retry tries, they will be returned together with the successful responses
response, expected to be in JSON format, that cannot be converted to JSON object will be returned as None rather than throwing an exception
Sometimes
grequests.map()
returns responses which are either unsuccessful or simplyNone
. So far_wait_for_response()
was retrying the whole request batch each time there was an unsuccessful response for any of the requests. After this change only the requests that were unsuccessful will be called again in the next call togrequests.map()
.Also some other aspects of handling the responses was changed:
max_retry
tries, they will be returned together with the successful responsesNone
rather than throwing an exception