监控启智智算任务状态定时任务修改判断逻辑
This commit is contained in:
parent
8e5b2cf2cf
commit
24f92273cf
|
|
@ -44,7 +44,7 @@ public class ServiceVersionStatusTask {
|
|||
STATUS_URL = zsServiceVersionUrl + "/api/v1/getInferenceTaskAsync";
|
||||
}
|
||||
|
||||
// @Scheduled(cron = "0 * * * * ?") // 每分钟执行一次
|
||||
@Scheduled(cron = "0 * * * * ?") // 每分钟执行一次
|
||||
public void executeServiceVersionStatus() {
|
||||
try {
|
||||
// 1. 调用queryAllVersionList接口获取所有runState为RUNNING的数据
|
||||
|
|
@ -163,7 +163,7 @@ public class ServiceVersionStatusTask {
|
|||
/**
|
||||
* 新增定时任务:处理已完成的任务,获取URL
|
||||
*/
|
||||
// @Scheduled(cron = "0 * * * * ?") // 每分钟执行一次
|
||||
@Scheduled(cron = "0 * * * * ?") // 每分钟执行一次
|
||||
public void executeSetUrl() {
|
||||
try {
|
||||
// 1. 调用queryAllComplList接口获取所有runState为COMPLETED且url为空的数据
|
||||
|
|
@ -205,11 +205,11 @@ public class ServiceVersionStatusTask {
|
|||
*/
|
||||
@Scheduled(cron = "0 * * * * ?") // 每分钟执行一次
|
||||
public void executeServiceStatusChange() {
|
||||
try {
|
||||
List<ServiceVersionZs> completedVersions = serviceVersionMapper.queryAllRunList();
|
||||
|
||||
if (completedVersions != null && !completedVersions.isEmpty()) {
|
||||
for (ServiceVersionZs version : completedVersions) {
|
||||
List<ServiceVersionZs> runningVersions = serviceVersionMapper.queryAllRunList();
|
||||
if (runningVersions != null && !runningVersions.isEmpty()) {
|
||||
try {
|
||||
for (ServiceVersionZs version : runningVersions) {
|
||||
// 2. 过滤获取数据中的jobSetId字段
|
||||
String jobSetId = version.getJobSetId();
|
||||
if (jobSetId != null && !jobSetId.isEmpty()) {
|
||||
|
|
@ -231,9 +231,9 @@ public class ServiceVersionStatusTask {
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Error executing service version URL task", e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Error executing service version URL task", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue