Auto Execute A Web Service In Falcon
I have a function which registers my web-services to spring-eureka discovery server but it automatically de-registers it. to solve this problem, I thought to make a function which
Solution 1:
We can make another program which will ping the health check URL of my web server.
responsePythonAPI = requests.request("GET", "http://10.95.51.8:5050/health", headers=headers)
pythonAPI = Trueif responsePythonAPI.json()["status"]["value"] == u'200 OK'and responsePythonAPI.json()["status"]["code"] == 200elseFalseif pythonAPI == True:
eureka.registerWebService()
else:
eureka.deregisterWebService()
This program will run as soon as application gets up and running and registers it in in time inteval of 100seconds
Post a Comment for "Auto Execute A Web Service In Falcon"