1
0

fix: 修复定时任务启动没有传任务上下文

This commit is contained in:
2025-09-07 11:09:02 +08:00
parent bc246043c8
commit 5cb8124bc0

View File

@@ -2,6 +2,7 @@ package com.lanyuanxiaoyao.leopard.server.service;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.lanyuanxiaoyao.leopard.server.service.task.TaskMonitorNodes;
import com.yomahub.liteflow.core.FlowExecutor;
import java.time.LocalDateTime;
import java.time.ZoneId;
@@ -95,7 +96,8 @@ public class QuartzService {
if (ObjectUtil.isNotNull(templateId)) {
var template = taskTemplateService.detail(templateId);
var params = (Map<String, Object>) dataMap.getOrDefault("params", Map.of());
flowExecutor.execute2Resp(template.getChain(), params, context);
var monitorContext = new TaskMonitorNodes.TaskMonitorContext(template);
flowExecutor.execute2Resp(template.getChain(), params, monitorContext);
}
}
}