3 #from time import sleep
5 from datetime import datetime
21 ##############################
23 ##############################
25 command="curl -s -o /dev/null -I -w \"%{http_code}\" -i http://" + BE_IP + ":8080/sdc2/rest/v1/user/jh0003"
27 proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE )
28 (out, err) = proc.communicate()
32 ##############################
34 ##############################
37 myResult = checkBackend()
39 print '[INFO]: Backend is up and running'
43 currentTime = datetime.now()
44 print '[ERROR]: ' + currentTime.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + ' Backend not responding, try #' + str(i) + bcolors.ENDC
48 print '[ERROR]: ' + time.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + 'Backend is DOWN :-(' + bcolors.ENDC