本文整理汇总了Python中pyon.net.endpoint.RPCResponseEndpointUnit._make_routing_call方法的典型用法代码示例。如果您正苦于以下问题:Python RPCResponseEndpointUnit._make_routing_call方法的具体用法?Python RPCResponseEndpointUnit._make_routing_call怎么用?Python RPCResponseEndpointUnit._make_routing_call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyon.net.endpoint.RPCResponseEndpointUnit
的用法示例。
在下文中一共展示了RPCResponseEndpointUnit._make_routing_call方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _make_routing_call
# 需要导入模块: from pyon.net.endpoint import RPCResponseEndpointUnit [as 别名]
# 或者: from pyon.net.endpoint.RPCResponseEndpointUnit import _make_routing_call [as 别名]
def _make_routing_call(self, call, timeout, *op_args, **op_kwargs):
if not self._routing_call:
return RPCResponseEndpointUnit._make_routing_call(self, call, timeout, *op_args, **op_kwargs)
ctx = self._process.get_context()
ar = self._routing_call(call, ctx, *op_args, **op_kwargs)
res = ar.get()
# REMOVED TIMEOUT
#try:
# res = ar.get(timeout=timeout)
#except Timeout:
# # cancel or abort current processing
# self._process._process.cancel_or_abort_call(ar)
# raise IonTimeout("Process did not execute in allotted time") # will be returned to caller via messaging
# Persistent process state handling
if hasattr(self._process, "_proc_state"):
if self._process._proc_state_changed:
log.debug("Process %s state changed. State=%s", self._process.id, self._process._proc_state)
self._process._flush_state()
return res
示例2: _make_routing_call
# 需要导入模块: from pyon.net.endpoint import RPCResponseEndpointUnit [as 别名]
# 或者: from pyon.net.endpoint.RPCResponseEndpointUnit import _make_routing_call [as 别名]
def _make_routing_call(self, call, op_args):
if not self._routing_call:
return RPCResponseEndpointUnit._make_routing_call(self, call, op_args)
ar = self._routing_call(call, op_args, context=self._process.get_context())
return ar.get() # @TODO: timeout?