Skip to content

Commit

Permalink
refactor ventilator-worker socket
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Dec 18, 2018
1 parent eafb30f commit 39e9ffc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/bert_serving/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def run(self):
@zmqd.socket(zmq.PULL)
@zmqd.socket(zmq.PAIR)
@multi_socket(zmq.PUSH, num_socket=8)
def _run(self, _, frontend, sink, backend_socks):
def _run(self, _, frontend, sink, *backend_socks):

def push_new_job(_job_id, _json_msg, _msg_len):
# backend_socks[0] is always at the highest priority
Expand Down Expand Up @@ -340,7 +340,7 @@ def run(self):

@zmqd.socket(zmq.PUSH)
@multi_socket(zmq.PULL, num_socket=_num_socket_)
def _run(self, sink, receivers):
def _run(self, sink, *receivers):
self.logger.info('use device %s, load graph from %s' %
('cpu' if self.device_id < 0 else ('gpu: %d' % self.device_id), self.graph_path))

Expand Down

0 comments on commit 39e9ffc

Please sign in to comment.