package io.geekidea.springbootplus.scheduled;

import com.wecloud.multimeet.service.MultiMeetService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author wenzhida
 * @Date 2022/3/28 16:34
 * @Description 多人音视频相关定时器
 */
@Slf4j
@Component
public class MultiMeetScheduled {

    @Autowired
    private MultiMeetService multiMeetService;

    /**
     * 呼叫超时处理
     * 每5秒执行一次
     */
    @Scheduled(cron = "*/5 * * * * ?")
    public void callingTimeout() {
        log.info("呼叫超时处理开始...");
        multiMeetService.callingTimeout();
        log.info("呼叫超时处理结束...");
    }

}
