def __init__(self): super(self.__class__, self).__init__( b_logstd=False ) log.info('Start to run ' + str(__file__)) self._hb = heartbeat.HeartbeatService( judge_lost_in_sec=5, keep_lost=True ) self._tmpfile = _NOW_PATH + '_tmp_file'
def __init__(self, ip, port, confdict): """control service of arrow master""" # status, 0 inited, 1 running 2 stopping, 3 stopped msgcenter.IMessageCenter.__init__(self, ip, port) self._master_ipport = (ip, port) self._confdict = confdict self._status = 0 self._type_man = msg.CMsgType() self._type_man.register_types(settings.MSG_TYPE2NUM) self._executor = executor.ExecutionService( self._confdict['control']['queue_exec_thdnum'], self._confdict['control']['queue_delay_exe_thdnum']) self._heartbeat_service = hb_service.HeartbeatService( self._confdict['control']['judge_agent_dead_in_sec'], self._confdict['control']['keep_lost']) self._msg_recv = 0