#NEWLINE# @ app . route ( '/admin/healthcheck' ) #NEWLINE# def flask_healthcheck( ) : #NEWLINE# #INDENT# healthy = True #NEWLINE# for greenlet_name in _GREENLET_DICT : #NEWLINE# #INDENT# if _GREENLET_DICT [ greenlet_name ] . dead : #NEWLINE# #INDENT# healthy = False #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# if ( not healthy ) : #NEWLINE# #INDENT# message = { #NEWLINE# #INDENT# 'status' : 500 , #NEWLINE# #UNINDENT# } #NEWLINE# resp = jsonify ( message ) #NEWLINE# resp . status_code = 500 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not _INITIALIZATION_COMPLETED ) : #NEWLINE# #INDENT# message = { #NEWLINE# #INDENT# 'status' : 204 , #NEWLINE# #UNINDENT# } #NEWLINE# resp = jsonify ( greenlet_name ) #NEWLINE# resp . status_code = 204 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# message = { #NEWLINE# #INDENT# 'status' : 200 , #NEWLINE# #UNINDENT# } #NEWLINE# resp = jsonify ( message ) #NEWLINE# resp . status_code = 200 #NEWLINE# #UNINDENT# #UNINDENT# return resp