Skip to content

Commit

Permalink
revomed properties for file chacking in PropertyHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
LewerenzM committed Dec 18, 2023
1 parent eb14fa9 commit 1fabbe9
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions src/main/java/org/icatproject/ids/PropertyHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ public static Logger getLogger() {
private ArchiveStorageInterface archiveStorage;
private Path cacheDir;
private boolean enableWrite;
private Path filesCheckErrorLog;
private int filesCheckGapMillis;
private Path filesCheckLastIdFile;
private int filesCheckParallelCount;
private ICAT icatService;
private long linkLifetimeMillis;

Expand Down Expand Up @@ -197,23 +193,6 @@ private PropertyHandler() {
abort(cacheDir + " must be an existing directory");
}

if (props.has("filesCheck.parallelCount")) {
filesCheckParallelCount = props.getNonNegativeInt("filesCheck.parallelCount");
} else {
filesCheckParallelCount = 0;
}
if (filesCheckParallelCount > 0) {
filesCheckGapMillis = props.getPositiveInt("filesCheck.gapSeconds") * 1000;
filesCheckLastIdFile = props.getFile("filesCheck.lastIdFile").toPath();
if (!Files.exists(filesCheckLastIdFile.getParent())) {
abort("Directory for " + filesCheckLastIdFile + " does not exist");
}
filesCheckErrorLog = props.getFile("filesCheck.errorLog").toPath();
if (!Files.exists(filesCheckErrorLog.getParent())) {
abort("Directory for " + filesCheckErrorLog + " does not exist");
}
}

if (props.has("linkLifetimeSeconds")) {
linkLifetimeMillis = props.getNonNegativeLong("linkLifetimeSeconds") * 1000L;
} else {
Expand Down Expand Up @@ -265,22 +244,6 @@ public boolean getEnableWrite() {
return enableWrite;
}

public Path getFilesCheckErrorLog() {
return filesCheckErrorLog;
}

public long getFilesCheckGapMillis() {
return filesCheckGapMillis;
}

public Path getFilesCheckLastIdFile() {
return filesCheckLastIdFile;
}

public int getFilesCheckParallelCount() {
return filesCheckParallelCount;
}

public synchronized ICAT getIcatService() {
// Keep trying every 10 seconds to connect to ICAT. Each failure
// will produce an error message.
Expand Down

0 comments on commit 1fabbe9

Please sign in to comment.