From fbe2c67fb41ae27160163029c3d9b4814764cf7d Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Tue, 27 Jun 2017 20:46:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9AAPI=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E6=9C=8D=E5=8A=A1=E5=A4=B1=E8=B4=A5=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96=EF=BC=8C=E6=96=B9=E4=BE=BF=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E6=8E=92=E6=9F=A5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + .../src/main/java/com/xxl/job/core/util/AdminApiUtil.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 175e7f36..991cf982 100644 --- a/README.md +++ b/README.md @@ -855,6 +855,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 #### 6.16 版本 V1.8.0 特性[Coding] - 1、任务Cron更新逻辑优化,改为rescheduleJob,同时防止cron重复设置; +- 2、优化:API回调服务失败状态码优化,方便问题排查; #### TODO LIST - 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限; diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/util/AdminApiUtil.java b/xxl-job-core/src/main/java/com/xxl/job/core/util/AdminApiUtil.java index 5ae3526f..7f887873 100644 --- a/xxl-job-core/src/main/java/com/xxl/job/core/util/AdminApiUtil.java +++ b/xxl-job-core/src/main/java/com/xxl/job/core/util/AdminApiUtil.java @@ -97,7 +97,7 @@ public class AdminApiUtil { if (null != entity) { if (response.getStatusLine().getStatusCode() != 200) { EntityUtils.consume(entity); - return ReturnT.FAIL; + return new ReturnT(response.getStatusLine().getStatusCode(), "StatusCode Error."); } String responseMsg = EntityUtils.toString(entity, "UTF-8");