You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
349 B
Python

#!/usr/bin/python
import oursql, sys
db = oursql.connect(host="localhost", user="root", passwd="", db="transfer")
c = db.cursor()
server = sys.argv[1]
c.execute("UPDATE servers SET `Busy` = 0 WHERE `Host` = '%s'" % server)
c.execute("UPDATE entries SET `Finished` = 2 WHERE (`Finished` = 3 OR `Finished` = 1) AND `TargetNode` = '%s'" % server)