def start(self, restricted=None, reSetupAuth=True): KITZStack.start(self, restricted=restricted, reSetupAuth=reSetupAuth) # Calling service lifecycle to allow creation of remotes # that this stack needs to connect to # self.serviceLifecycle() logger.info("{}{} listening for other nodes at {}:{}".format( CONNECTION_PREFIX, self, *self.ha), extra={"tags": ["node-listening"]})
def __init__(self, stackParams: dict, msgHandler: Callable, seed=None, config=None, msgRejectHandler=None, metrics=NullMetricsCollector(), timer=None): config = config or getConfig() simple_zstack_class.__init__( self, stackParams, msgHandler, seed=seed, onlyListener=True, config=config, msgRejectHandler=msgRejectHandler, create_listener_monitor=config.TRACK_CONNECTED_CLIENTS_NUM_ENABLED, metrics=metrics, mt_incoming_size=MetricsName.INCOMING_CLIENT_MESSAGE_SIZE, mt_outgoing_size=MetricsName.OUTGOING_CLIENT_MESSAGE_SIZE, timer=timer) MessageProcessor.__init__(self, allowDictOnly=False) if config.CLIENT_STACK_RESTART_ENABLED and not config.TRACK_CONNECTED_CLIENTS_NUM_ENABLED: error_str = '{}: client stack restart is enabled (CLIENT_STACK_RESTART_ENABLED) ' \ 'but connections tracking is disabled (TRACK_CONNECTED_CLIENTS_NUM_ENABLED), ' \ 'please check your configuration'.format(self) raise RuntimeError(error_str) self.track_connected_clients_num_enabled = config.TRACK_CONNECTED_CLIENTS_NUM_ENABLED self.client_stack_restart_enabled = config.CLIENT_STACK_RESTART_ENABLED self.max_connected_clients_num = config.MAX_CONNECTED_CLIENTS_NUM self.postrestart_wait_time = config.STACK_POSTRESTART_WAIT_TIME self.min_stack_restart_timeout = config.MIN_STACK_RESTART_TIMEOUT self.max_stack_restart_time_deviation = config.MAX_STACK_RESTART_TIME_DEVIATION self.listenerQuota = config.CLIENT_TO_NODE_STACK_QUOTA self.listenerSize = config.CLIENT_TO_NODE_STACK_SIZE if self.track_connected_clients_num_enabled: logger.info( '{}: clients connections tracking is enabled.'.format(self)) self.init_connections_tracking_params() if self.client_stack_restart_enabled: logger.info('{}: client stack restart is enabled.'.format(self)) self.init_stack_restart_params()
def start(self): KITRStack.start(self) logger.info("{} listening for other nodes at {}:{}". format(self, *self.ha), extra={"tags": ["node-listening"]})
def start(self, restricted=None, reSetupAuth=True): KITZStack.start(self, restricted=restricted, reSetupAuth=reSetupAuth) logger.info("{} listening for other nodes at {}:{}".format( self, *self.ha), extra={"tags": ["node-listening"]})