fix #1510 move fess.var.path and fess.thumbnail.path

This commit is contained in:
Shinsuke Sugaya 2018-02-16 23:23:12 +09:00
parent b6d7cdf8e8
commit f2539b2cf9
3 changed files with 9 additions and 7 deletions

View file

@ -418,4 +418,8 @@ public class Constants extends CoreLibConstants {
public static final String EMPTY_USER_ID = "<empty>";
public static final String CRAWLER_PROCESS_COMMAND_THREAD_DUMP = "thread_dump";
public static final String FESS_THUMBNAIL_PATH = "fess.thumbnail.path";
public static final String FESS_VAR_PATH = "fess.var.path";
}

View file

@ -217,6 +217,8 @@ public class GenerateThumbnailJob {
logFilePath = value != null ? value : new File(targetDir, "logs").getAbsolutePath();
}
cmdList.add("-Dfess.log.path=" + logFilePath);
addSystemProperty(cmdList, Constants.FESS_VAR_PATH, null, null);
addSystemProperty(cmdList, Constants.FESS_THUMBNAIL_PATH, null, null);
addSystemProperty(cmdList, "fess.log.name", "fess-thumbnail", "-thumbnail");
if (logLevel != null) {
cmdList.add("-Dfess.log.level=" + logLevel);

View file

@ -54,10 +54,6 @@ import org.slf4j.LoggerFactory;
import com.google.common.collect.Lists;
public class ThumbnailManager {
private static final String FESS_THUMBNAIL_PATH = "fess.thumbnail.path";
private static final String FESS_VAR_PATH = "fess.var.path";
private static final String NOIMAGE_FILE_SUFFIX = ".txt";
protected static final String THUMBNAILS_DIR_NAME = "thumbnails";
@ -90,11 +86,11 @@ public class ThumbnailManager {
@PostConstruct
public void init() {
final String thumbnailPath = System.getProperty(FESS_THUMBNAIL_PATH);
final String thumbnailPath = System.getProperty(Constants.FESS_THUMBNAIL_PATH);
if (thumbnailPath != null) {
baseDir = new File(thumbnailPath);
} else {
final String varPath = System.getProperty(FESS_VAR_PATH);
final String varPath = System.getProperty(Constants.FESS_VAR_PATH);
if (varPath != null) {
baseDir = new File(varPath, THUMBNAILS_DIR_NAME);
} else {
@ -165,7 +161,7 @@ public class ThumbnailManager {
}
public String getThumbnailPathOption() {
return "-D" + FESS_THUMBNAIL_PATH + "=" + baseDir.getAbsolutePath();
return "-D" + Constants.FESS_THUMBNAIL_PATH + "=" + baseDir.getAbsolutePath();
}
protected void storeQueue(final List<Tuple3<String, String, String>> taskList) {