Skip to content

Commit

Permalink
fix to update cycle
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3992 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Jul 18, 2007
1 parent cff0194 commit dcb8687
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/de/anomic/plasma/parser/ps/psParser.java
Expand Up @@ -108,8 +108,8 @@ public boolean testForPs2Ascii() {
int returnCode = ps2asciiProc.waitFor();
return (returnCode == 0);
} catch (Exception e) {
this.theLogger.logInfo("ps2ascii not found. Switching to java parser mode.");
return false;
if (this.theLogger != null) this.theLogger.logInfo("ps2ascii not found. Switching to java parser mode.");
return false;
}
}

Expand Down
4 changes: 2 additions & 2 deletions source/de/anomic/yacy/yacyVersion.java
Expand Up @@ -183,7 +183,7 @@ public static final boolean shallRetrieveUpdateInfo() {
if (process.equals("manual")) return false; // no, its a manual process

// check if the last retrieve time is a minimum time ago
long cycle = Math.max(1, sb.getConfigLong("update.cycle", 168)) * 24 * 60 * 60 * 1000;
long cycle = Math.max(1, sb.getConfigLong("update.cycle", 168)) * 60 * 60 * 1000; // update.cycle is hours
long timeLookup = sb.getConfigLong("update.time.lookup", System.currentTimeMillis());
if (timeLookup + cycle > System.currentTimeMillis()) return false; // no we have recently made a lookup

Expand All @@ -205,7 +205,7 @@ public static final yacyVersion rulebasedUpdateInfo(boolean manual) {
}

// check if the last retrieve time is a minimum time ago
long cycle = Math.max(1, sb.getConfigLong("update.cycle", 168)) * 24 * 60 * 60 * 1000;
long cycle = Math.max(1, sb.getConfigLong("update.cycle", 168)) * 60 * 60 * 1000; // update.cycle is hours
long timeLookup = sb.getConfigLong("update.time.lookup", System.currentTimeMillis());
if ((!manual) && (timeLookup + cycle > System.currentTimeMillis())) {
yacyCore.log.logInfo("rulebasedUpdateInfo: too early for a lookup for a new release (timeLookup = " + timeLookup + ", cycle = " + cycle + ", now = " + System.currentTimeMillis() + ")");
Expand Down

0 comments on commit dcb8687

Please sign in to comment.