提交 1de6854a 编写于 作者: B barriery

update code

上级 b27f43de
......@@ -330,7 +330,7 @@ class ProcessChannel(object):
def front(self, op_name=None, timeout=None):
_LOGGER.debug(
self._log("{} try to get data[?]; timeout={}".format(op_name,
self._log("{} try to get data[?]; timeout(s)={}".format(op_name,
timeout)))
endtime = None
if timeout is not None:
......@@ -603,7 +603,7 @@ class ThreadChannel(Queue.Queue):
def front(self, op_name=None, timeout=None):
_LOGGER.debug(
self._log("{} try to get data[?]; timeout={}".format(op_name,
self._log("{} try to get data[?]; timeout(s)={}".format(op_name,
timeout)))
endtime = None
if timeout is not None:
......
......@@ -87,7 +87,8 @@ class Op(object):
.format(self.name, self._batch_size))
self._batch_size = 1
if self._auto_batching_timeout != None:
_LOGGER.warn("Op({}) reset auto_batching_timeout=1 (original: {})"
_LOGGER.warn(
"Op({}) reset auto_batching_timeout=None (original: {})"
.format(self.name, self._auto_batching_timeout))
self._auto_batching_timeout = None
......@@ -235,6 +236,9 @@ class Op(object):
target=self._run,
args=(concurrency_idx, self._get_input_channel(),
self._get_output_channels(), client_type, True))
# When a process exits, it attempts to terminate
# all of its daemonic child processes.
t.daemon = True
t.start()
threads.append(t)
return threads
......@@ -310,7 +314,7 @@ class Op(object):
_LOGGER.error(error_info)
else:
_LOGGER.warn(
log_func("timeout, retry({}/{})"
log_func("PaddleService timeout, retry({}/{})"
.format(i + 1, self._retry)))
except Exception as e:
ecode = ChannelDataEcode.UNKNOW.value
......@@ -399,7 +403,7 @@ class Op(object):
while True:
batch = []
_LOGGER.debug(
log_func("Auto-batching expect size: {}; timeout: {}".format(
log_func("Auto-batching expect size: {}; timeout(s): {}".format(
batch_size, timeout)))
while len(batch) == 0:
endtime = None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册