/**
 * 
 */
package org.springblade.etl.task.service.impl;

import org.springblade.etl.service.DsyJobInstanceService;
import org.springblade.etl.task.model.DaemonTaskType;
import org.springblade.etl.task.service.AbstractDaemonTask;

import cn.hutool.extra.spring.SpringUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * @author wookvn
 *
 */
@Slf4j
public class DataxJobInstanceTask extends AbstractDaemonTask {
	@Override
	public void invoke(Integer dataId) {
        try {
        	//刷新作业实例信息
        	SpringUtil.getBean(DsyJobInstanceService.class).refreshJobInstance(dataId);
		} catch (Exception e) {
			log.error(e.getMessage(), e);
		}
	}

	@Override
	public DaemonTaskType getType() {
		return DaemonTaskType.datax_job;
	}
}
