def load_conf(): conf_file = os.getenv("VIGILO_SETTINGS", "/etc/vigilo/vigirrd/settings.ini") logging.config.fileConfig(conf_file) LOGGER.debug("Loading the configuration") # Chargement de la configuration de VigiRRD conf = appconfig("config:%s#main" % conf_file) load_environment(conf.global_conf, conf.local_conf)
def setup_app(command, conf, variables): """Place any commands to setup vigirrd here""" load_environment(conf.global_conf, conf.local_conf) # Load the models from vigirrd import model print "Creating tables" model.metadata.create_all(bind=config['pylons.app_globals'].sa_engine) transaction.commit() print "Successfully setup"