Ejemplo n.º 1
0
def spawn_rds():
    logging.info('Spawning a new RDS instance, this takes at least 10min!')
    conn = RDSConnection()
    
    db = conn.create_dbinstance(DB_NAME, 5, 'db.m1.small', DB_USER, DB_PASSWORD)
    
    while True:
        try:
            db = conn.get_all_dbinstances(instance_id=DB_NAME)[0]
        except Exception, e:
            logging.debug('Unexpected exception "%s"' % e)
        else:
            if db.endpoint is not None and db.status == 'available':
                break

        time.sleep(45)
        logging.debug('Waiting...')
Ejemplo n.º 2
0
def spawn_rds():
    logging.info('Spawning a new RDS instance, this takes at least 10min!')
    conn = RDSConnection()

    db = conn.create_dbinstance(DB_NAME, 5, 'db.m1.small', DB_USER,
                                DB_PASSWORD)

    while True:
        try:
            db = conn.get_all_dbinstances(instance_id=DB_NAME)[0]
        except Exception, e:
            logging.debug('Unexpected exception "%s"' % e)
        else:
            if db.endpoint is not None and db.status == 'available':
                break

        time.sleep(45)
        logging.debug('Waiting...')