def __init__(self): """ Constructor """ # Set log file to trace lagarto exceptions LagartoException.error_file = os.path.join(MaxDefinitions.working_dir, "logs", "lagarto.err") # Lagarto broker constructor LagartoBroker.__init__(self, MaxDefinitions.working_dir) NetworkAPI(lagarto_client=self) # Read configuration config_file = os.path.join(MaxDefinitions.working_dir, "config", "settings.xml") XmlSettings(config_file) # Run startup script scripts.events.startup() # Open database self.database = DataBase() # Start periodic trigger thread PeriodicTrigger(self.database) # Start Lagarto client self.start()
def stop(self): """ Stop event manager """ # Stop lagarto client LagartoBroker.stop(self)