package com.yihu.wlyy.job.consult;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;

/**
 * @author Sand
 * @since 2016/9/23
 */
public class ConsultCleanerJob implements Job {
    @Autowired
    ConsultCleaner cleaner;

    public final static String ConsultTerminatorJobKey = "consult-terminator";

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);

        cleaner.doClean();
    }
}
