From 2494a820c7af206866e853c6b0f9daf48ef89c16 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Wed, 24 Feb 2016 15:13:20 +0100 Subject: [PATCH] 0N - added recording of dump exports if given time frame is not negative --- htroot/IndexExport_p.java | 4 ++++ source/net/yacy/data/WorkTables.java | 1 + 2 files changed, 5 insertions(+) diff --git a/htroot/IndexExport_p.java b/htroot/IndexExport_p.java index 12f437c26..a0f38c6eb 100644 --- a/htroot/IndexExport_p.java +++ b/htroot/IndexExport_p.java @@ -26,6 +26,7 @@ import java.io.IOException; import java.util.List; import net.yacy.cora.protocol.RequestHeader; +import net.yacy.data.WorkTables; import net.yacy.search.Switchboard; import net.yacy.search.index.Fulltext; import net.yacy.search.index.Segment; @@ -106,6 +107,9 @@ public class IndexExport_p { final String query = post.get("exportquery", "*:*"); final int maxseconds = post.getInt("exportmaxseconds", -1); final String path = post.get("exportfilepath", ""); + + // store this call as api call: we do this even if there is a chance that it fails because recurring calls may do not fail + if (maxseconds != -1) sb.tables.recordAPICall(post, "IndexExport_p.html", WorkTables.TABLE_API_TYPE_DUMP, format + "-dump, q=" + query + ", maxseconds=" + maxseconds); // start the export try { diff --git a/source/net/yacy/data/WorkTables.java b/source/net/yacy/data/WorkTables.java index a7bff08c8..b265b848d 100644 --- a/source/net/yacy/data/WorkTables.java +++ b/source/net/yacy/data/WorkTables.java @@ -67,6 +67,7 @@ public class WorkTables extends Tables { public final static String TABLE_API_TYPE_CONFIGURATION = "configuration"; public final static String TABLE_API_TYPE_CRAWLER = "crawler"; public final static String TABLE_API_TYPE_DELETION = "deletion"; + public final static String TABLE_API_TYPE_DUMP = "dump"; public final static String TABLE_API_COL_TYPE = "type"; public final static String TABLE_API_COL_COMMENT = "comment";