mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
[fix] fix the bug of uncorrect statistics of job
This commit is contained in:
parent
3528a7724f
commit
4e1a447f50
@ -14,6 +14,7 @@ import java.util.concurrent.*;
|
||||
* 公用线程池配置
|
||||
* omsTimingPool:用于执行定时任务的线程池
|
||||
* omsCommonPool:用于执行普通任务的线程池
|
||||
* omsCommonPool:用于执行后台任务的线程池,这类任务对时间不敏感,慢慢执行细水长流即可
|
||||
* taskScheduler:用于定时调度的线程池
|
||||
*
|
||||
* @author tjq
|
||||
|
@ -30,6 +30,6 @@ public interface JobInfoRepository extends JpaRepository<JobInfoDO, Long> {
|
||||
// 校验工作流包含的任务
|
||||
long countByAppIdAndStatusAndIdIn(Long appId, int status, List<Long> jobIds);
|
||||
|
||||
long countByAppId(long appId);
|
||||
long countByAppIdAndStatusNot(long appId, int status);
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import com.github.kfcfans.powerjob.common.response.ResultDTO;
|
||||
import com.github.kfcfans.powerjob.common.utils.JsonUtils;
|
||||
import com.github.kfcfans.powerjob.server.akka.OhMyServer;
|
||||
import com.github.kfcfans.powerjob.server.akka.requests.FriendQueryWorkerClusterStatusReq;
|
||||
import com.github.kfcfans.powerjob.server.common.constans.SwitchableStatus;
|
||||
import com.github.kfcfans.powerjob.server.persistence.core.model.AppInfoDO;
|
||||
import com.github.kfcfans.powerjob.server.persistence.core.repository.AppInfoRepository;
|
||||
import com.github.kfcfans.powerjob.server.persistence.core.repository.InstanceInfoRepository;
|
||||
@ -98,7 +99,7 @@ public class SystemInfoController {
|
||||
SystemOverviewVO overview = new SystemOverviewVO();
|
||||
|
||||
// 总任务数量
|
||||
overview.setJobCount(jobInfoRepository.countByAppId(appId));
|
||||
overview.setJobCount(jobInfoRepository.countByAppIdAndStatusNot(appId, SwitchableStatus.DELETED.getV()));
|
||||
// 运行任务数
|
||||
overview.setRunningInstanceCount(instanceInfoRepository.countByAppIdAndStatus(appId, InstanceStatus.RUNNING.getV()));
|
||||
// 近期失败任务数(24H内)
|
||||
|
Loading…
x
Reference in New Issue
Block a user