示例#1
0
def stop_job():
    response = TaskScheduler.stop_job(job_id=request.json.get('job_id', ''), end_status=JobStatus.CANCELED)
    if not response:
        TaskScheduler.stop_job(job_id=request.json.get('job_id', ''), end_status=JobStatus.FAILED)
        return get_json_result(retcode=0, retmsg='kill job success')
    return get_json_result(retcode=0, retmsg='cancel job success')
示例#2
0
def stop_job():
    TaskScheduler.stop_job(job_id=request.json.get('job_id', ''))
    return get_json_result(retcode=0, retmsg='success')