예제 #1
0
def cancel_job(job_id, role, party_id):
    JobController.cancel_job(job_id=job_id,
                             role=role,
                             party_id=int(party_id),
                             job_initiator=request.json.get(
                                 'job_initiator', {}))
    return get_json_result(retcode=0, retmsg='success')
예제 #2
0
def cancel_job(job_id, role, party_id):
    res = JobController.cancel_job(job_id=job_id,
                                   role=role,
                                   party_id=int(party_id),
                                   job_initiator=request.json.get(
                                       'job_initiator', {}))
    if res:
        return get_json_result(retcode=0, retmsg='cancel job success')
    return get_json_result(retcode=101, retmsg='cancel job failed')