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;

/**
 * 自动统分定时任务
 */
public class SubjectCalculateJob extends QuartzJobBean {
    private final static Logger log = LoggerFactory.getLogger(SubjectCalculateJob.class);

    @Resource
    JobService jobService;

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) {
        try {
            jobService.updateMarkerQuality();
        } catch (Exception e) {
            log.error(SystemConstant.LOG_ERROR, e);
        }
    }
}
