def poll_session(self, poll_url, initial_delay=2, delay=1, tries=20,
                     errors=GRACEFUL, **params):
        """
        Poll the URL
        :param poll_url - URL to poll,
                          should be returned by 'create_session' call
        :param initial_delay - specifies how many seconds to wait before
                               the first poll
        :param delay - specifies how many seconds to wait between the polls
        :param tries - number of polls to perform
        :param errors - errors handling mode,
                        see corresponding parameter in 'make_request' method
        :param params - additional query params for each poll request
        """
        time.sleep(initial_delay)
        poll_response = None
        for n in range(tries):
            poll_response = self.make_request(
                poll_url,
                headers=self._headers(),
                errors=errors, **params
            )

            if self.is_poll_complete(poll_response):
                return poll_response
            else:
                time.sleep(delay)

        if STRICT == errors:
            raise ExceededRetries(
                "Failed to poll within {0} tries.".format(tries))
        else:
            return poll_response
def poll_session ( self , poll_url , initial_delay = 2 , delay = 1 , tries = 20 , errors = GRACEFUL , ** params ) : time . sleep ( initial_delay ) poll_response = None for n in range ( tries ) : poll_response = self . make_request ( poll_url , headers = self . _headers ( ) , errors = errors , ** params ) if self . is_poll_complete ( poll_response ) : return poll_response else : time . sleep ( delay ) if STRICT == errors : raise ExceededRetries ( "Failed to poll within {0} tries." . format ( tries ) ) else : return poll_response
Poll the URL
        :param poll_url - URL to poll,
                          should be returned by 'create_session' call
        :param initial_delay - specifies how many seconds to wait before
                               the first poll
        :param delay - specifies how many seconds to wait between the polls
        :param tries - number of polls to perform
        :param errors - errors handling mode,
                        see corresponding parameter in 'make_request' method
        :param params - additional query params for each poll request