2 Created on Feb 14, 2014 8 from collections
import namedtuple
19 logger = logging.getLogger(APP_CONSTS.LOGGER_NAME)
23 HostParams = namedtuple(
"HostParams",
"host port")
77 def process(self, command, timeout=3000, ttl=300000):
80 except ConnectionTimeout
as err:
82 except TransportInternalErr
as err:
84 except CommandExecutorErr
as err:
96 raise connection_timeout
107 raise transport_internal_err
118 raise command_executor_err
def process(self, command, timeout=3000, ttl=300000)
def execute(self, commands, nodes)
execute method execute incoming commands on nodes, keepts reult in responses and responsesDicts field...
def activate_host(self, host_params)
def executor_err_hook(self, command_executor_err, command, timeout)
Simple wrapper that hide all routines related to create and destroy connections.
def transport_err_hook(self, transport_internal_err, command, timeout)
Convertor which used to convert Task*Reques to json and TaskResponse from json.
def timeout_hook(self, connection_timeout, command, timeout)