From dcb8687904d95946fc2cfa5f644116a935130612 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 18 Jul 2007 22:45:29 +0000 Subject: [PATCH] fix to update cycle git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3992 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/parser/ps/psParser.java | 4 ++-- source/de/anomic/yacy/yacyVersion.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/de/anomic/plasma/parser/ps/psParser.java b/source/de/anomic/plasma/parser/ps/psParser.java index a1cf8d044..06abdb15f 100644 --- a/source/de/anomic/plasma/parser/ps/psParser.java +++ b/source/de/anomic/plasma/parser/ps/psParser.java @@ -108,8 +108,8 @@ public class psParser extends AbstractParser implements Parser { 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; } } diff --git a/source/de/anomic/yacy/yacyVersion.java b/source/de/anomic/yacy/yacyVersion.java index c1c33d665..dab5ffb52 100644 --- a/source/de/anomic/yacy/yacyVersion.java +++ b/source/de/anomic/yacy/yacyVersion.java @@ -183,7 +183,7 @@ public final class yacyVersion implements Comparator, Comparable { 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 @@ -205,7 +205,7 @@ public final class yacyVersion implements Comparator, Comparable { } // 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() + ")");