Exemple #1
0
def delete_job(args):
    """Delete a job"""
    status = resources.get_job_status(args.id)
    if status != "DONE" and status != "ERROR":
        print "Cannot delete until the job is done. Job status: %s." % status
        return
    
    result = resources.delete_job(args.id)
    if result != None:
        print "Job deleted"
    else:
        print "Error deleting job"
Exemple #2
0
def delete_job(args):
    """Delete a job"""
    status = resources.get_job_status(args.id)
    if status != "DONE" and status != "ERROR":
        print "Cannot delete until the job is done. Job status: %s." % status
        return

    result = resources.delete_job(args.id)
    if result != None:
        print "Job deleted"
    else:
        print "Error deleting job"
Exemple #3
0
def delete_job(job_id):
    """Delete a job"""
    if job_id == None or job_id == "":
        print "ID required"
        return
    
    status = resources.get_job_status(job_id)
    if status != "DONE":
        print "Cannot delete until the job is done. Job status: %s." % status
        return
    
    result = resources.delete_job(job_id)
    if result != None:
        print "Job deleted"
    else:
        print "Error deleting job"