package com.jiayue.ipfcst.fileupload.job;


import com.jiayue.ipfcst.fileupload.service.GenerateUltraShortDataService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 超短期数据生成
 *
 * @author whc
 * @version 3.0
 * @since 2021/5/18 14:34
 */
@Slf4j
public class GenerateUltraShortDataJob implements Job {
  @Autowired
  GenerateUltraShortDataService generateUltraShortDataService;

  @Override
  public void execute(JobExecutionContext context) throws JobExecutionException {

    try {
      generateUltraShortDataService.generateData();
    }catch (Exception e){
      log.info("执行超短期数据生成定时任务发生错误: "+e);
    }
    log.info("执行超短期数据生成定时任务成功");
  }
}
