Skip to content

Commit

Permalink
🐛fixed pull bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stelin committed Sep 7, 2023
1 parent 8db1936 commit faf96ba
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,14 @@ private PageVO<ListTaskVO> getTaskListBySecond(ListTaskRequest request) {

// Pull task from worker at first page
if (NumberUtils.INTEGER_ZERO.equals(request.getPage() - 1)) {
Long pullCircleId = 0L;
JobInstanceTask latestParentTask = this.jobInstanceTaskDAO.getLatestParentTask(request.getJobInstanceId(), TaskConstant.DEFAULT_PARENT_ID);
if (Objects.isNull(latestParentTask)) {
return pageVO;
if (Objects.nonNull(latestParentTask)) {
pullCircleId = latestParentTask.getCircleId();
}

// Add pull tasks
List<ListTaskVO> taskList = this.pullTaskListFromWorker(latestParentTask.getCircleId(), jobInstance);
List<ListTaskVO> taskList = this.pullTaskListFromWorker(pullCircleId, jobInstance);
pageVO.getList().addAll(0, taskList);
}
return pageVO;
Expand Down

0 comments on commit faf96ba

Please sign in to comment.