package com.qmth.teachcloud.task.job;

import com.qmth.teachcloud.common.contant.SystemConstant;
import com.qmth.teachcloud.task.job.service.JobService;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;

import javax.annotation.Resource;

/**
 * @Description: 用户需重新推送再次推送定时任务
 * @Author: CaoZixuan
 * @Date: 2021-11-05
 */
public class TimedSyncUserNeedPushAgainJob extends QuartzJobBean {
    private final static Logger log = LoggerFactory.getLogger(TimedSyncUserNeedPushAgainJob.class);

    @Resource
    JobService jobService;

    @Override
    protected void executeInternal(JobExecutionContext context) {
        try {
            jobService.needPushAgain();
        } catch (IllegalAccessException e) {
            log.error(SystemConstant.LOG_ERROR, e);
        }
    }
}
