【修改】 1、新增项目启动清除所有的任务ID;2、修改ws send方法参数

This commit is contained in:
DESKTOP-9ERGOBP\任维炳
2025-10-20 12:58:25 +08:00
parent ad2b0b510e
commit 02bc650c1b
3 changed files with 30 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
package pc.exam.pp.server.config;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import pc.exam.pp.module.judgement.service.TaskManager;
@Slf4j
@Component
public class TaskToStop {
@Resource
TaskManager taskManager;
@PostConstruct
public void init() {
// 清除所有的任务
taskManager.stopAll();
log.info("✅ 已经清除所有任务ID");
}
}