Exemple #1
0
def doStuff():
    # get local robot info
    ldb = DatabaseSQLite(TESTDB)
    ldb.connect()
    robotList = ldb.getAllRobots()
    userList = []
    ldb.close()

    db = DatabaseMySQL(host=HOST, user=USER, passwd=PASSWD, db=DB)
    db.connect()
    db.insertAllRobots(robotList)
    while True:
        try:
            doRobotStuff(db, robotList)
            doUserStuff(db, userList)
        except Exception as inst:
            print '-----------------------------------'
            print inst
            print '-----------------------------------'
        time.sleep(5)
Exemple #2
0
def doStuff():
    # get local robot info
    ldb = DatabaseSQLite(TESTDB)
    ldb.connect()
    robotList = ldb.getAllRobots()
    userList = []
    ldb.close()

    db = DatabaseMySQL(host = HOST, user = USER, passwd = PASSWD, db = DB)
    db.connect()
    db.insertAllRobots(robotList)
    while True:
        try:
            doRobotStuff(db, robotList)
            doUserStuff(db, userList)
        except Exception as inst:
            print '-----------------------------------'
            print inst
            print '-----------------------------------'
        time.sleep(5)