完善服务发现

This commit is contained in:
virusdefender 2016-10-04 00:08:11 +08:00
parent fe115969b0
commit 2884f7bf5a
2 changed files with 2 additions and 13 deletions

View File

@ -10,7 +10,6 @@ RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-se
RUN apt-get update
RUN apt-get install -y oracle-java7-installer
RUN cd /tmp && git clone https://github.com/QingdaoU/Judger && cd Judger && git checkout newnew && mkdir build && cd build && cmake .. && make && make install && cd ../bindings/Python && python setup.py install
RUN mkdir /var/wp
RUN pip install psutil gunicorn web.py requests
RUN mkdir -p /judger_run /test_case /log /code
COPY deploy/java_policy /etc

View File

@ -45,21 +45,11 @@ class JudgeService(object):
if r["err"]:
raise JudgeServiceError(r["data"])
def register(self):
data = server_info()
data["action"] = "register"
data["service_host"] = self.service_host
data["service_port"] = self.service_port
self._request(data)
def unregister(self):
data = server_info()
data["action"] = "unregister"
self._request(data)
def heartbeat(self):
data = server_info()
data["action"] = "heartbeat"
data["service_host"] = self.service_host
data["service_port"] = self.service_port
self._request(data)