lin
2025-08-01 633231e833e21d5b8b1c00cb15aedb62b3b78e8f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python
import os, sys, shutil
thisdir = os.path.dirname(os.path.abspath(sys.argv[0]))
sys.path.insert(0, os.path.abspath(os.path.join(thisdir, '../tko')))
import db
 
usage = "usage: delete_job_results <job tag>"
 
if len(sys.argv) < 2:
    print usage
    sys.exit(2)
tag = sys.argv[1]
resultsdir = os.path.abspath(os.path.join(thisdir, '../results', tag))
 
db = db.db()
if not db.find_job(tag):
    raise "Job tag %s does not exist in database" % tag
 
db.delete_job(tag)
shutil.rmtree(resultsdir)