I have created an abstraction layer on top of requests.get() using a class called ConnectionManager.
This class allows the user to specify how many times to retry a request if it fails. It can also modify the time to wait between retries and the sleeping time after a successful retry. Unittests have yet not been created for this class. I have tried not to modify the original code, but some changes were required.
I have created an abstraction layer on top of requests.get() using a class called ConnectionManager.
This class allows the user to specify how many times to retry a request if it fails. It can also modify the time to wait between retries and the sleeping time after a successful retry. Unittests have yet not been created for this class. I have tried not to modify the original code, but some changes were required.