package com.docus.server.jobadmin.scheduler;

import com.docus.server.jobadmin.thread.ZjFsCatalogCollectTaskHelper;
import com.docus.server.jobadmin.thread.ZjFsCostListCollectTaskHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author YongBin Wen
 * @date 2024/1/23 14:04
 */

public class JobScheduler {

    private static final Logger logger = LoggerFactory.getLogger(JobScheduler.class);

    public void init() throws Exception {
        ZjFsCatalogCollectTaskHelper.getInstance().start();
        ZjFsCostListCollectTaskHelper.getInstance().start();

        logger.info(">>>>>>>>> init job admin success.");
    }


    public void destroy()  {
        ZjFsCatalogCollectTaskHelper.getInstance().toStop();
        ZjFsCostListCollectTaskHelper.getInstance().toStop();
    }
}
