Commit 7d03d1f6 by liuyu

2023年05/16 标注任务添加日志

parent f67a8ae2
...@@ -32,6 +32,6 @@ public class TaskPoolConfig { ...@@ -32,6 +32,6 @@ public class TaskPoolConfig {
@Bean("templateExecutor") @Bean("templateExecutor")
public ThreadPoolExecutorTimeout templateExecutor() { public ThreadPoolExecutorTimeout templateExecutor() {
return new ThreadPoolExecutorTimeout(1000L * 60 * 30, 10, 20,10000L, return new ThreadPoolExecutorTimeout(1000L * 60 * 30, 10, 20,10000L,
TimeUnit.MILLISECONDS, 10, "模板任务线程池"); TimeUnit.MILLISECONDS, 100, "模板任务线程池");
} }
} }
...@@ -36,7 +36,6 @@ public class TaskServiceHandler { ...@@ -36,7 +36,6 @@ public class TaskServiceHandler {
if (taskService.thresholdWarn()) { if (taskService.thresholdWarn()) {
log.error("任务类型:{},当前运行任务已到达最大核心数", autoTask.getType()); log.error("任务类型:{},当前运行任务已到达最大核心数", autoTask.getType());
} }
log.info("任务类型:{},开始执行,信息:{}", autoTask.getType(), JSONObject.toJSONString(autoTask));
taskService.runTask(autoTask); taskService.runTask(autoTask);
return taskType.getCacheId(); return taskType.getCacheId();
} }
......
...@@ -73,8 +73,9 @@ public class TaskServiceCommon extends BaseTaskTypePair<TaskServiceCommon.TaskCo ...@@ -73,8 +73,9 @@ public class TaskServiceCommon extends BaseTaskTypePair<TaskServiceCommon.TaskCo
log.error("本地任务可用数据为空,taskType:{}", autoTask.getType()); log.error("本地任务可用数据为空,taskType:{}", autoTask.getType());
} }
autoMarkExecutor.execute(() -> { autoMarkExecutor.execute(() -> {
log.info("自动标注任务"); long now = System.currentTimeMillis();
projectAutoMark(dataSourceInfo); projectAutoMark(dataSourceInfo);
log.info("任务类型:{},开始执行,信息:{}, 耗时:{}", autoTask.getType(), JSONObject.toJSONString(autoTask), System.currentTimeMillis() - now);
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment