package cc.smtweb.framework.core.systask;


import cc.smtweb.framework.core.util.StringUtil;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public abstract class SysThreadWorker implements Runnable {

    private String bizName;

    protected SysThreadWorker() {

    }

    protected SysThreadWorker(String bizName) {
        this.bizName = StringUtil.checkNull(bizName);
    }


    @Override
    public void run() {
        try {
            localWork();
        } catch (Exception e) {
            log.error("SysPool handle error：", e);
        }
    }

    public abstract void localWork() throws Exception;
}
