ids = {'pandatest.000003.dd.input._00028.junk':'6c19e1fc-ee8c-4bae-bd4c-c9e5c73aca27', 'pandatest.000003.dd.input._00033.junk':'98f79ba1-1793-4253-aac7-bdf90a51d1ee', 'pandatest.000003.dd.input._00039.junk':'33660dd5-7cef-422a-a7fc-6c24cb10deb1'} for lfn in ids.keys(): file = FileSpec() file.lfn = lfn file.GUID = ids[file.lfn] file.dataset = 'pandatest.000003.dd.input' file.type = 'input' job.addFile(file) s,o = Client.submitJobs([job]) print "---------------------" print s print o print "---------------------" s,o = Client.getJobStatus([4934, 4766, 4767, 4768, 4769]) print s if s == 0: for job in o: if job == None: continue print job.PandaID for file in job.Files: print file.lfn,file.type print "---------------------" s,o = Client.queryPandaIDs([0]) print s print o
'98f79ba1-1793-4253-aac7-bdf90a51d1ee', 'pandatest.000003.dd.input._00039.junk': '33660dd5-7cef-422a-a7fc-6c24cb10deb1' } for lfn in ids.keys(): file = FileSpec() file.lfn = lfn file.GUID = ids[file.lfn] file.dataset = 'pandatest.000003.dd.input' file.type = 'input' job.addFile(file) s, o = Client.submitJobs([job]) print "---------------------" print s print o print "---------------------" s, o = Client.getJobStatus([4934, 4766, 4767, 4768, 4769]) print s if s == 0: for job in o: if job == None: continue print job.PandaID for file in job.Files: print file.lfn, file.type print "---------------------" s, o = Client.queryPandaIDs([0]) print s print o
import sys import userinterface.Client as Client if len(sys.argv) == 2: jobDefIDs = [sys.argv[1]] else: startID = int(sys.argv[1]) endID = int(sys.argv[2]) if startID > endID: print '%d is less than %d' % (endID, startID) sys.exit(1) jobDefIDs = range(startID, endID + 1) # quesry PandaID status, ids = Client.queryPandaIDs(jobDefIDs) if status != 0: sys.exit(0) # remove None while True: if not None in ids: break ids.remove(None) # kill if len(ids) != 0: Client.killJobs(ids)
import sys import userinterface.Client as Client if len(sys.argv) == 2: jobDefIDs = [sys.argv[1]] else: startID = int(sys.argv[1]) endID = int(sys.argv[2]) if startID > endID: print '%d is less than %d' % (endID,startID) sys.exit(1) jobDefIDs = range(startID,endID+1) # quesry PandaID status, ids = Client.queryPandaIDs(jobDefIDs) if status != 0: sys.exit(0) # remove None while True: if not None in ids: break ids.remove(None) # kill if len(ids) != 0: Client.killJobs(ids)