liusuyi
2023-06-29 3daa378637a5ceeb4965b554f528a7a36e3d5c2a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.ruoyi.alarm.globalAlarm.service.impl;
 
/**
 * @ClassName QueueTaskExecutor
 * @Description:
 * @Author 刘苏义
 * @Date 2023/6/29 21:10
 * @Version 1.0
 */
 
import com.ruoyi.alarm.globalAlarm.domain.GuideTask;
import org.springframework.stereotype.Component;
 
@Component
public class QueueTaskExecutor {
    public void processTask(GuideTask guideTask) {
        System.out.println("Executing task: " + guideTask.getAlarmId());
        try {
            Thread.sleep(30000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("finished task: " + guideTask.getAlarmId());
    }
}