@@ -179,6 +179,8 @@ public static void SubmitCode(Question question) {
179179 JSONObject returnObj = JSONObject .parseObject (body );
180180 cachedThreadPool .execute (new SubmitCheckTask (returnObj , codeTypeEnum , question ));
181181 MessageUtils .showInfoMsg ("info" , PropertiesUtils .getInfo ("request.pending" ));
182+ }else if (response != null && response .getStatusLine ().getStatusCode () == 429 ){
183+ MessageUtils .showInfoMsg ("info" , PropertiesUtils .getInfo ("request.pending" ));
182184 } else {
183185 LogUtils .LOG .error ("提交失败:url:" + post .getURI ().getPath () + ";param:" + arg .toJSONString () + ";body:" + EntityUtils .toString (response .getEntity (), "UTF-8" ));
184186 MessageUtils .showWarnMsg ("error" , PropertiesUtils .getInfo ("request.failed" ));
@@ -441,6 +443,9 @@ public RunCodeCheckTask(JSONObject returnObj) {
441443 @ Override
442444 public void run () {
443445 String key = returnObj .getString ("interpret_expected_id" );
446+ if (StringUtils .isBlank (key )){
447+ key = returnObj .getString ("interpret_id" );
448+ }
444449 for (int i = 0 ; i < 50 ; i ++) {
445450 String body = null ;
446451 try {
@@ -458,6 +463,9 @@ public void run() {
458463 String input = returnObj .getString ("test_case" );
459464 String output = jsonObject .getJSONArray ("code_answer" ).getString (0 );
460465 String expected = returnObj .getJSONArray ("expected_code_answer" ).getString (0 );
466+ if (StringUtils .isBlank (expected )){
467+ expected = jsonObject .getJSONArray ("expected_code_answer" ).getString (0 );
468+ }
461469 MessageUtils .showInfoMsg ("info" , PropertiesUtils .getInfo ("test.success" , input , output , expected ));
462470 } else {
463471 MessageUtils .showInfoMsg ("info" , PropertiesUtils .getInfo ("submit.run.failed" , jsonObject .getString ("full_compile_error" )));
0 commit comments