From e8f90201a59269ec0b67075d95bba4ceeb05e555 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 13 Oct 2010 13:00:36 +0000 Subject: [PATCH] fix for scheduling of rss feeds git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7247 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Load_RSS_p.java | 2 +- source/de/anomic/crawler/RSSLoader.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htroot/Load_RSS_p.java b/htroot/Load_RSS_p.java index d339eacaa..3d7505935 100644 --- a/htroot/Load_RSS_p.java +++ b/htroot/Load_RSS_p.java @@ -289,7 +289,7 @@ public class Load_RSS_p { if (record_api && rss != null && rss.getFeed() != null && rss.getFeed().getChannel() != null) { // record API action - RSSLoader.recordAPI(sb, url, rss.getFeed(), repeat_time, repeat_unit); + RSSLoader.recordAPI(sb, post.get(WorkTables.TABLE_API_COL_APICALL_PK, null), url, rss.getFeed(), repeat_time, repeat_unit); } // show items from rss diff --git a/source/de/anomic/crawler/RSSLoader.java b/source/de/anomic/crawler/RSSLoader.java index 33cc04131..5c02a3043 100644 --- a/source/de/anomic/crawler/RSSLoader.java +++ b/source/de/anomic/crawler/RSSLoader.java @@ -74,7 +74,7 @@ public class RSSLoader extends Thread { indexAllRssFeed(sb, urlf, feed); // add the feed also to the scheduler - recordAPI(sb, urlf, feed, 7, "seldays"); + recordAPI(sb, null, urlf, feed, 7, "seldays"); } public static void indexAllRssFeed(Switchboard sb, DigestURI url, RSSFeed feed) { @@ -119,12 +119,13 @@ public class RSSLoader extends Thread { } - public static void recordAPI(Switchboard sb, DigestURI url, RSSFeed feed, int repeat_time, String repeat_unit) { + public static void recordAPI(Switchboard sb, String apicall_pk, DigestURI url, RSSFeed feed, int repeat_time, String repeat_unit) { // record API action byte[] pk = null; serverObjects post = new serverObjects(); post.put("url", url.toNormalform(true, false)); post.put("indexAllItemContent", ""); + if (apicall_pk != null) post.put(WorkTables.TABLE_API_COL_APICALL_PK, apicall_pk); if (repeat_time > 0) { // store as scheduled api call pk = sb.tables.recordAPICall(post, "Load_RSS_p.html", WorkTables.TABLE_API_TYPE_CRAWLER, "import feed " + url.toNormalform(true, false), repeat_time, repeat_unit.substring(3));