Exemple #1
0
def main():
    aim_cfg.init(sys.argv[1:])
    aim_cfg.setup_logging()
    signal.signal(signal.SIGTERM, shutdown)
    try:
        run(aim_cfg.CONF, False)
    except (RuntimeError, ValueError) as e:
        LOG.error("%s CherryPy Server terminated!" % e)
        sys.exit(1)
def main():
    aim_cfg.init(sys.argv[1:])
    aim_cfg.setup_logging()
    signal.signal(signal.SIGTERM, shutdown)
    try:
        run(aim_cfg.CONF, False)
    except (RuntimeError, ValueError) as e:
        LOG.error("%s CherryPy Server terminated!" % e)
        sys.exit(1)
Exemple #3
0
def main(klass):
    aim_cfg.init(sys.argv[1:])
    aim_cfg.setup_logging()
    try:
        agent = klass(aim_cfg.CONF)
    except (RuntimeError, ValueError) as e:
        LOG.error("%s Agent terminated!" % e)
        sys.exit(1)

    signal.signal(signal.SIGTERM, agent._handle_sigterm)
    agent.run()
Exemple #4
0
def db_migration(ctx):
    alembic_path = os.path.abspath(
        os.path.join(os.path.dirname(migration.__file__),
                     'alembic.ini'))
    migrate_path = os.path.abspath(os.path.dirname(
        alembic_migrations.__file__))
    migration_config = {'alembic_ini_path': alembic_path,
                        'alembic_repo_path': migrate_path}
    ctx.obj['manager'] = manager.MigrationManager(migration_config,
                                                  engine=api.get_engine())
    config.setup_logging()