Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
None
-
None
Description
If job submit successfully we should return ok(200) instead of ACCEPTED(202)
if job submit fail, success should be false
if (!jobSpec.validate()) { return new JsonResponse.Builder<String>(Response.Status.ACCEPTED) .success(true).result("Invalid params.").build(); } try { Job job = JobManager.getInstance().submitJob(jobSpec); return new JsonResponse.Builder<Job>(Response.Status.ACCEPTED) .success(true).result(job).build(); } catch (UnsupportedJobTypeException e) { return new JsonResponse.Builder<String>(Response.Status.ACCEPTED) .success(true).result(e.getMessage()).build(); }
Attachments
Issue Links
- links to