質問

I have wrote a python daemon for read a database... I do the next:

db.connect('localhost', user, pass, database)
while true:
    cursor = db.cursor()
    sql = "SELECT id FROM task WHERE status='pending'"
    r = cursor.execute(sql)
    if r != 0:
        result = cursor.fetchall()
        #.....

The problem is that: when change database, the daemon not detect it... can refresh... what can I do??

thanks!!

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top