fix(1.5.0-beta1): 优化snailJobHttpExecutor逻辑
This commit is contained in:
parent
607c3dc607
commit
e75c56c248
@ -129,7 +129,7 @@ public abstract class AbstractHttpExecutor {
|
||||
// 检查响应体是否包含指定的状态码字段
|
||||
Map<String, Object> objectObjectMap = JsonUtil.parseHashMap(body);
|
||||
if (!objectObjectMap.containsKey(field)) {
|
||||
SnailJobLog.LOCAL.error("the responseType is json,but there is no status code field:" + field);
|
||||
SnailJobLog.LOCAL.error("the responseType is json,but there is no status code field:{}", field);
|
||||
return ExecuteResult.failure("the responseType is json,but there is no status code field:" + field);
|
||||
}
|
||||
// 检查响应体中状态码是否与指定的状态码是否一致
|
||||
|
@ -23,12 +23,7 @@ public class SnailJobHttpExecutor extends AbstractHttpExecutor {
|
||||
httpParams.setWfContext(jobArgs.getWfContext());
|
||||
}
|
||||
httpParams.setMethod(httpParams.getMethod().toUpperCase());
|
||||
Map<String, String> hashMap = new HashMap<>(3);
|
||||
hashMap.put(SystemConstants.SNAIL_JOB_CLIENT_GROUP, snailJobProperties.getGroup());
|
||||
hashMap.put(SystemConstants.SNAIL_JOB_CLIENT_GROUP_TOKEN, snailJobProperties.getToken());
|
||||
hashMap.put(SystemConstants.SNAIL_JOB_CLIENT_NAMESPACE, snailJobProperties.getNamespace());
|
||||
Map<String, String> headers = (Objects.isNull(httpParams.getHeaders()) || httpParams.getHeaders().isEmpty()) ? new HashMap<>() : httpParams.getHeaders();
|
||||
headers.putAll(hashMap);
|
||||
httpParams.setHeaders(headers);
|
||||
return process(httpParams);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class JobLogServiceImpl implements JobLogService {
|
||||
String sid = queryVO.getSid();
|
||||
LogPageQueryDO pageQueryDO = new LogPageQueryDO();
|
||||
pageQueryDO.setPage(1);
|
||||
pageQueryDO.setSize(queryVO.getSize());
|
||||
pageQueryDO.setSize(50);
|
||||
pageQueryDO.setTaskBatchId(queryVO.getTaskBatchId());
|
||||
pageQueryDO.setTaskId(queryVO.getTaskId());
|
||||
pageQueryDO.setStartRealTime(queryVO.getStartRealTime());
|
||||
|
@ -100,7 +100,7 @@ public class RetryTaskServiceImpl implements RetryTaskService {
|
||||
String sid = queryVO.getSid();
|
||||
RetryTaskLogMessageQueryDO pageQueryDO = new RetryTaskLogMessageQueryDO();
|
||||
pageQueryDO.setPage(1);
|
||||
pageQueryDO.setSize(queryVO.getSize());
|
||||
pageQueryDO.setSize(50);
|
||||
pageQueryDO.setRetryTaskId(queryVO.getRetryTaskId());
|
||||
pageQueryDO.setStartRealTime(queryVO.getStartRealTime());
|
||||
pageQueryDO.setSearchCount(true);
|
||||
|
Loading…
Reference in New Issue
Block a user