/** * Remove the job from the pool, and will delete the job from zk * @param jobId the job id */ public Boolean removeJob(Long jobId){ Response<JobDetail> findResp = jobService.findJobDetailById(jobId); if (!findResp.isSuccess()){ Logs.error("failed to find the job detail when remove job(id={}), cause: {}", jobId, findResp.getErr()); return Boolean.TRUE; } if (removeJob(findResp.getData())){ // unbind the job from the server Response<Boolean> unbindResp = jobService.unbindJobServer(serverHost.get(), jobId); if (!unbindResp.isSuccess() || !unbindResp.getData()){ return Boolean.FALSE; } return Boolean.TRUE; } return Boolean.FALSE; }