#NEWLINE# @ gen . coroutine #NEWLINE# def load( self ) : #NEWLINE# #INDENT# 'Load URL.' #NEWLINE# LOGGER . debug ( '%s: start checking: %s' , self . name , self . query ) #NEWLINE# if self . waiting : #NEWLINE# #INDENT# self . notify ( 'warning' , 'Process takes too much time' , target = 'waiting' , ntype = 'common' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . waiting = True #NEWLINE# try : #NEWLINE# #INDENT# response = ( yield self . client . fetch ( self . query , method = self . options . get ( 'method' , 'GET' ) , request_timeout = self . request_timeout , connect_timeout = self . connect_timeout , validate_cert = self . options . get ( 'validate_cert' , True ) ) ) #NEWLINE# self . check ( [ ( self . get_data ( response ) , self . query ) ] ) #NEWLINE# self . notify ( 'normal' , 'Metrics are loaded' , target = 'loading' , ntype = 'common' ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . notify ( 'critical' , str ( e ) , target = 'loading' , ntype = 'common' ) #NEWLINE# #UNINDENT# self . waiting = False