Java Code Examples for com.xxl.job.core.log.XxlJobFileAppender#getGlueSrcPath()

The following examples show how to use com.xxl.job.core.log.XxlJobFileAppender#getGlueSrcPath() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScriptJobHandler.java    From microservices-platform with Apache License 2.0 6 votes vote down vote up
public ScriptJobHandler(int jobId, long glueUpdatetime, String gluesource, GlueTypeEnum glueType){
    this.jobId = jobId;
    this.glueUpdatetime = glueUpdatetime;
    this.gluesource = gluesource;
    this.glueType = glueType;

    // clean old script file
    File glueSrcPath = new File(XxlJobFileAppender.getGlueSrcPath());
    if (glueSrcPath.exists()) {
        File[] glueSrcFileList = glueSrcPath.listFiles();
        if (glueSrcFileList!=null && glueSrcFileList.length>0) {
            for (File glueSrcFileItem : glueSrcFileList) {
                if (glueSrcFileItem.getName().startsWith(String.valueOf(jobId)+"_")) {
                    glueSrcFileItem.delete();
                }
            }
        }
    }

}
 
Example 2
Source File: ScriptJobHandler.java    From zuihou-admin-boot with Apache License 2.0 6 votes vote down vote up
public ScriptJobHandler(int jobId, long glueUpdatetime, String gluesource, GlueTypeEnum glueType) {
    this.jobId = jobId;
    this.glueUpdatetime = glueUpdatetime;
    this.gluesource = gluesource;
    this.glueType = glueType;

    // clean old script file
    File glueSrcPath = new File(XxlJobFileAppender.getGlueSrcPath());
    if (glueSrcPath.exists()) {
        File[] glueSrcFileList = glueSrcPath.listFiles();
        if (glueSrcFileList != null && glueSrcFileList.length > 0) {
            for (File glueSrcFileItem : glueSrcFileList) {
                if (glueSrcFileItem.getName().startsWith(String.valueOf(jobId) + "_")) {
                    glueSrcFileItem.delete();
                }
            }
        }
    }

}
 
Example 3
Source File: ScriptJobHandler.java    From zuihou-admin-cloud with Apache License 2.0 6 votes vote down vote up
public ScriptJobHandler(int jobId, long glueUpdatetime, String gluesource, GlueTypeEnum glueType) {
    this.jobId = jobId;
    this.glueUpdatetime = glueUpdatetime;
    this.gluesource = gluesource;
    this.glueType = glueType;

    // clean old script file
    File glueSrcPath = new File(XxlJobFileAppender.getGlueSrcPath());
    if (glueSrcPath.exists()) {
        File[] glueSrcFileList = glueSrcPath.listFiles();
        if (glueSrcFileList != null && glueSrcFileList.length > 0) {
            for (File glueSrcFileItem : glueSrcFileList) {
                if (glueSrcFileItem.getName().startsWith(String.valueOf(jobId) + "_")) {
                    glueSrcFileItem.delete();
                }
            }
        }
    }

}
 
Example 4
Source File: ScriptJobHandler.java    From xxl-job with GNU General Public License v3.0 6 votes vote down vote up
public ScriptJobHandler(int jobId, long glueUpdatetime, String gluesource, GlueTypeEnum glueType){
    this.jobId = jobId;
    this.glueUpdatetime = glueUpdatetime;
    this.gluesource = gluesource;
    this.glueType = glueType;

    // clean old script file
    File glueSrcPath = new File(XxlJobFileAppender.getGlueSrcPath());
    if (glueSrcPath.exists()) {
        File[] glueSrcFileList = glueSrcPath.listFiles();
        if (glueSrcFileList!=null && glueSrcFileList.length>0) {
            for (File glueSrcFileItem : glueSrcFileList) {
                if (glueSrcFileItem.getName().startsWith(String.valueOf(jobId)+"_")) {
                    glueSrcFileItem.delete();
                }
            }
        }
    }

}