Merge pull request #4 from QingdaoU/bug_fix

Fix  a bug about api path.
This commit is contained in:
李扬 2017-05-02 21:26:07 +08:00 committed by GitHub
commit fc04c2d2a1

View File

@ -24,7 +24,7 @@ class JudgeService(object):
raise JudgeServiceError("service discovery host or port not found")
else:
self.service_discovery_url = "http://" + self.service_discovery_host + ":" + \
str(self.service_discovery_port) + "/api/judge_service/"
str(self.service_discovery_port) + "/api/judge_server_heartbeat/"
def _request(self, data):
try:
@ -34,7 +34,7 @@ class JudgeService(object):
except Exception as e:
logger.exception(e)
raise JudgeServiceError(e.message)
if r["err"]:
if r["error"]:
raise JudgeServiceError(r["data"])
def heartbeat(self):