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

import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.etl.service.JobInstanceService;
import org.springblade.etl.task.model.DaemonTaskType;
import org.springblade.etl.task.service.AbstractDaemonTask;

import lombok.extern.slf4j.Slf4j;

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

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