(self, serviceName, token, serviceManager, appData)
return True
Starts a bot process to handle a service.
Starts a bot process to handle a service.
Starts a bot process to handle a service .
def start_service(self, serviceName, token, serviceManager, appData):
        '''Starts a bot process to handle a service.'''
        # find bot that handles this service
        botInfo = self._get_service_info(serviceName)
        if botInfo is None:
            # service not found
            raise ValueError('%s bot not found' % serviceName)

        # build command line config
        cfg = {
            'serviceName' : serviceName,
            'serviceToken' : token,
            'managerId' : serviceManager.get_manager_id(),
            'connectionInfo' : serviceManager.get_connection_info(),
            'appData' : appData
        }
        # build command line args
        args, kwargs = self._build_command(cfg, botInfo)
        # launch the bot
        key = (self._sessionId, serviceName)
        self._tracker.launch_process(key, self.on_child_dead, *args, **kwargs)
        log.info('%s bot started in %s', serviceName, self._sessionId)
        return True
def start_service ( self , serviceName , token , serviceManager , appData ) : # find bot that handles this service botInfo = self . _get_service_info ( serviceName ) if botInfo is None : # service not found raise ValueError ( '%s bot not found' % serviceName ) # build command line config cfg = { 'serviceName' : serviceName , 'serviceToken' : token , 'managerId' : serviceManager . get_manager_id ( ) , 'connectionInfo' : serviceManager . get_connection_info ( ) , 'appData' : appData } # build command line args args , kwargs = self . _build_command ( cfg , botInfo ) # launch the bot key = ( self . _sessionId , serviceName ) self . _tracker . launch_process ( key , self . on_child_dead , * args , * * kwargs ) log . info ( '%s bot started in %s' , serviceName , self . _sessionId ) return True