[dev] support multi worker in one pc

This commit is contained in:
朱八 2020-07-31 20:07:38 +08:00
parent f9a30423f3
commit 9a2e239a06

View File

@ -1,6 +1,7 @@
package com.github.kfcfans.powerjob.worker.common.utils;
import com.github.kfcfans.powerjob.common.utils.CommonUtils;
import com.github.kfcfans.powerjob.worker.OhMyWorker;
/**
* 文件工具类
@ -11,7 +12,7 @@ import com.github.kfcfans.powerjob.common.utils.CommonUtils;
public class OmsWorkerFileUtils {
private static final String USER_HOME = System.getProperty("user.home", "powerjob");
private static final String WORKER_DIR = USER_HOME + "/powerjob/";
private static final String WORKER_DIR = USER_HOME + "/powerjob/" + OhMyWorker.getConfig().getAppName() + "/";
public static String getScriptDir() {
return WORKER_DIR + "script/";
@ -21,9 +22,6 @@ public class OmsWorkerFileUtils {
return WORKER_DIR + "container/";
}
public static String getH2BaseDir() {
return WORKER_DIR + "h2/";
}
public static String getH2WorkDir() {
return WORKER_DIR + "h2/" + CommonUtils.genUUID() + "/";
}