feat(1.4.0-beta1): 1. 优化重试任务统计数据
This commit is contained in:
parent
2c7e1f47a7
commit
5f242ddc28
@ -15,5 +15,5 @@ public interface RetryMapper extends BaseMapper<Retry> {
|
|||||||
|
|
||||||
int updateBatchNextTriggerAtById(@Param("list") List<Retry> list);
|
int updateBatchNextTriggerAtById(@Param("list") List<Retry> list);
|
||||||
|
|
||||||
List<DashboardRetryResponseDO> selectRetrySummaryList(@Param("ew") Wrapper<RetryTask> wrapper);
|
List<DashboardRetryResponseDO> selectRetrySummaryList(@Param("ew") Wrapper<Retry> wrapper);
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import com.aizuda.snailjob.server.common.triple.Triple;
|
|||||||
import com.aizuda.snailjob.template.datasource.persistence.dataobject.DashboardRetryResponseDO;
|
import com.aizuda.snailjob.template.datasource.persistence.dataobject.DashboardRetryResponseDO;
|
||||||
import com.aizuda.snailjob.template.datasource.persistence.mapper.RetryMapper;
|
import com.aizuda.snailjob.template.datasource.persistence.mapper.RetryMapper;
|
||||||
import com.aizuda.snailjob.template.datasource.persistence.mapper.RetrySummaryMapper;
|
import com.aizuda.snailjob.template.datasource.persistence.mapper.RetrySummaryMapper;
|
||||||
|
import com.aizuda.snailjob.template.datasource.persistence.po.Retry;
|
||||||
import com.aizuda.snailjob.template.datasource.persistence.po.RetrySummary;
|
import com.aizuda.snailjob.template.datasource.persistence.po.RetrySummary;
|
||||||
import com.aizuda.snailjob.template.datasource.persistence.po.RetryTask;
|
import com.aizuda.snailjob.template.datasource.persistence.po.RetryTask;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@ -61,9 +62,9 @@ public class RetrySummarySchedule extends AbstractSchedule implements Lifecycle
|
|||||||
// 重试按日实时查询统计数据(00:00:00 - 23:59:59)
|
// 重试按日实时查询统计数据(00:00:00 - 23:59:59)
|
||||||
LocalDateTime todayFrom = LocalDateTime.of(LocalDate.now(), LocalTime.MIN).plusDays(-i);
|
LocalDateTime todayFrom = LocalDateTime.of(LocalDate.now(), LocalTime.MIN).plusDays(-i);
|
||||||
LocalDateTime todayTo = LocalDateTime.of(LocalDate.now(), LocalTime.MAX).plusDays(-i);
|
LocalDateTime todayTo = LocalDateTime.of(LocalDate.now(), LocalTime.MAX).plusDays(-i);
|
||||||
LambdaQueryWrapper<RetryTask> wrapper = new LambdaQueryWrapper<RetryTask>()
|
LambdaQueryWrapper<Retry> wrapper = new LambdaQueryWrapper<Retry>()
|
||||||
.between(RetryTask::getCreateDt, todayFrom, todayTo)
|
.between(Retry::getCreateDt, todayFrom, todayTo)
|
||||||
.groupBy(RetryTask::getNamespaceId, RetryTask::getGroupName, RetryTask::getSceneName);
|
.groupBy(Retry::getNamespaceId, Retry::getGroupName, Retry::getSceneName);
|
||||||
List<DashboardRetryResponseDO> dashboardRetryResponseDOList = retryMapper.selectRetrySummaryList(wrapper);
|
List<DashboardRetryResponseDO> dashboardRetryResponseDOList = retryMapper.selectRetrySummaryList(wrapper);
|
||||||
if (CollUtil.isEmpty(dashboardRetryResponseDOList)) {
|
if (CollUtil.isEmpty(dashboardRetryResponseDOList)) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user