|
|
@@ -29,36 +29,23 @@ public class JudgeController {
|
|
|
|
|
|
@PostMapping("/code")
|
|
|
public Response judgeCode(@RequestParam(value = "problemId") Integer problemId, @RequestBody CodeJudgeVO codeJudgeVO) {
|
|
|
- Call call = MonitorClient.createCall(SeecSystem.CODER,"syncJudge","/api/judge/code");
|
|
|
- try{
|
|
|
- call.start();
|
|
|
- return Response.buildSuccess(judgeService.syncJudgeCode(problemId, codeJudgeVO));
|
|
|
- }catch (Exception e){
|
|
|
- MonitorClient.logError(SeecSystem.CODER,"syncJudge","/api/judge/code",e);
|
|
|
- call.fail();
|
|
|
- throw e;
|
|
|
- }finally {
|
|
|
- call.end();
|
|
|
- }
|
|
|
+ return Response.buildSuccess(judgeService.syncJudgeCode(problemId, codeJudgeVO));
|
|
|
}
|
|
|
|
|
|
@PostMapping("/asyncCode")
|
|
|
- public Response asyncJudgeCode(@RequestParam(value = "problemId") Integer problemId, @RequestBody CodeJudgeVO codeJudgeVO){
|
|
|
+ public Response asyncJudgeCode(@RequestParam(value = "problemId") Integer problemId, @RequestBody CodeJudgeVO codeJudgeVO) {
|
|
|
return Response.buildSuccess(judgeService.asyncJudgeCode(problemId, codeJudgeVO));
|
|
|
}
|
|
|
|
|
|
@PostMapping("/rabbit")
|
|
|
- public Response rabbit(@RequestParam(value = "problemId") Integer problemId, @RequestBody CodeJudgeVO codeJudgeVO){
|
|
|
+ public Response rabbit(@RequestParam(value = "problemId") Integer problemId, @RequestBody CodeJudgeVO codeJudgeVO) {
|
|
|
return Response.buildSuccess(judgeService.rabbit(problemId, codeJudgeVO));
|
|
|
}
|
|
|
|
|
|
@PostMapping("/mysqlAndMQ")
|
|
|
- public Response mysqlAndMQ(@RequestParam(value = "problemId") Integer problemId, @RequestBody CodeJudgeVO codeJudgeVO){
|
|
|
- return Response.buildSuccess(judgeService.rabbit(problemId, codeJudgeVO));
|
|
|
+ public Response mysqlAndMQ(@RequestParam(value = "problemId") Integer problemId, @RequestBody CodeJudgeVO codeJudgeVO) {
|
|
|
+ return Response.buildSuccess(judgeService.mysqlAndMQ(problemId, codeJudgeVO));
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|