sregistry/main/base/http.py
def healthy(self, url):
    '''determine if a resource is healthy based on an accepted response (200)
       or redirect (301)

       Parameters
       ==========
       url: the URL to check status for, based on the status_code of HEAD

    '''
    response = requests.get(url)
    status_code = response.status_code
    if status_code != 200:
        bot.error('%s, response status code %s.' %(url, status_code))  
        return False
    return True
def healthy(self, url):
    '''determine if a resource is healthy based on an accepted response (200)
       or redirect (301)

       Parameters
       ==========
       url: the URL to check status for, based on the status_code of HEAD

    '''
    response = requests.get(url)
    status_code = response.status_code
    if status_code != 200:
        bot.error('%s, response status code %s.' %(url, status_code))  
        return False
    return True
def healthy ( self , url ) : response = requests . get ( url ) status_code = response . status_code if status_code != 200 : bot . error ( '%s, response status code %s.' % ( url , status_code ) ) return False return True
determine if a resource is healthy based on an accepted response (200)
       or redirect (301)

       Parameters
       ==========
       url: the URL to check status for, based on the status_code of HEAD
determine if a resource is healthy based on an accepted response ( 200 ) or redirect ( 301 )