【修改】 1、新增项目启动清除所有的任务ID;2、修改ws send方法参数
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user