I am writing a python script to harvest data we might want before removing old jobs from qube. jobinfo works quite fine to get at the data I need.
I then have used qb.remove() to remove the job.
The job is no longer returned by qb.jobinfo, but it still appears in the gui. Is there another step that I should be taking?
thanks
jesse
import sys
sys.path.append( "/usr/local/pfx/qube/api/python" )
import qb
import MySQLdb
conn = MySQLdb.connect ( host = "localhost", user = "...", passwd = "...", db = "...")
cursor = conn.cursor ()
jobInfos = qb.jobinfo([]);
for job in jobInfos:
if job['timecomplete'] < time()-30*86400:
sql = "INSERT ... "
try:
cursor.execute(sql)
qb.remove(job['id'])
except:
print "Oopsies!",job['id']
cursor.close();
conn.close();