package cc.smtweb.system.canal.file.common;

import cc.smtweb.framework.core.db.DbEngine;
import cc.smtweb.framework.core.systask.BaseSysService;
import lombok.extern.slf4j.Slf4j;


@Slf4j
public class FileDecodeService extends BaseSysService {
    @Override
    public String getTitle() {
        return "解析canal文件";
    }

    @Override
    public int getInterval() {
        return 10;
    }

    @Override
    public void work() {
        try {
            AbstractFileWork fileWork = FileDecodeFactory.getInstance().getFileWork(DbEngine.getInstance().getDbType());
            fileWork.doWork();
        } catch (Exception e) {
            log.error("解析canal文件失败：", e);
        }
    }
}
