Beispiel #1
0
    def get_retry_after(self, headers):
        '''
            Gets the amount of seconds to wait before retrying an operation

        :param dict headers: :class:`requests.Response` headers
        :returns: Seconds to wait before retrying an operation
        :rtype: int
        '''
        return utils.get_retry_after(_ctx=self.ctx) or \
            int(headers.get('retry-after', 60))
Beispiel #2
0
    def get_retry_after(self, headers):
        '''
            Gets the amount of seconds to wait before retrying an operation

        :param dict headers: :class:`requests.Response` headers
        :returns: Seconds to wait before retrying an operation
        :rtype: int
        '''
        return utils.get_retry_after(_ctx=self.ctx) or \
            int(headers.get('retry-after', 60))