def __init__(self, name=None, application_settings=None, global_settings=None): RootService.__init__(self, settings=global_settings) # Compute name for Twisted service self.name = u'app-{name}'.format(name=name) # Make channel object from application settings configuration object self.channel = Bunch(**application_settings) # Create application service object composed of subsystem components service = MqttInfluxGrafanaService( channel = self.channel, # Data processing strategy and graphing components strategy=WanBusStrategy(), graphing=GrafanaManager(settings=global_settings, channel=self.channel) ) # Register service component with its container self.registerService(service)
def hiveeyes_boot(settings, debug=False): # Service container root rootService = RootService(settings=settings) # Channel realm channel = Bunch(**settings.hiveeyes) # Main application service service = MqttInfluxGrafanaService( channel=channel, graphing=[ HiveeyesGenericGrafanaManager(settings=settings, channel=channel), HiveeyesBeehiveGrafanaManager(settings=settings, channel=channel), ], strategy=WanBusStrategy()) rootService.registerService(service) rootService.startService()
def setupService(self): MqttInfluxGrafanaService.setupService(self) self.settings.influxdb.use_udp = True self.settings.influxdb.udp_port = 4445 self.influx = InfluxDBAdapter(settings=self.settings.influxdb)
def setupService(self): MqttInfluxGrafanaService.setupService(self) self.settings.influxdb.use_udp = True self.settings.influxdb.udp_port = 4445 self.influx = InfluxDBAdapter(settings = self.settings.influxdb)