manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1684712 - in /manifoldcf/trunk: CHANGES.txt framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Date Wed, 10 Jun 2015 16:56:05 GMT
Author: kwright
Date: Wed Jun 10 16:56:05 2015
New Revision: 1684712

URL: http://svn.apache.org/r1684712
Log:
Fix for CONNECTORS-1212.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1684712&r1=1684711&r2=1684712&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Wed Jun 10 16:56:05 2015
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 2.2-dev =====================
 
+CONNECTORS-1212: Fix export/import of jobs to handle max
+intervals.
+(Kevin J. Walsh, Karl Wright)
+
 CONNECTORS-1209: Add regular expression extraction to
 Metadata Adjuster.
 (Karl Wright)

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1684712&r1=1684711&r2=1684712&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Wed Jun 10 16:56:05 2015
@@ -124,7 +124,7 @@ public class JobManager implements IJobM
     throws java.io.IOException, ManifoldCFException
   {
     // Write a version indicator
-    ManifoldCF.writeDword(os,5);
+    ManifoldCF.writeDword(os,6);
     // Get the job list
     IJobDescription[] list = getAllJobs();
     // Write the number of authorities
@@ -137,6 +137,7 @@ public class JobManager implements IJobM
       ManifoldCF.writeDword(os,job.getType());
       ManifoldCF.writeDword(os,job.getStartMethod());
       ManifoldCF.writeLong(os,job.getInterval());
+      ManifoldCF.writeLong(os,job.getMaxInterval());
       ManifoldCF.writeLong(os,job.getExpiration());
       ManifoldCF.writeLong(os,job.getReseedInterval());
       ManifoldCF.writeDword(os,job.getPriority());
@@ -208,7 +209,7 @@ public class JobManager implements IJobM
     throws java.io.IOException, ManifoldCFException
   {
     int version = ManifoldCF.readDword(is);
-    if (version != 5)
+    if (version != 5 && version != 6)
       throw new java.io.IOException("Unknown job configuration version: "+Integer.toString(version));
     int count = ManifoldCF.readDword(is);
     for (int i = 0; i < count; i++)
@@ -220,6 +221,8 @@ public class JobManager implements IJobM
       job.setType(ManifoldCF.readDword(is));
       job.setStartMethod(ManifoldCF.readDword(is));
       job.setInterval(ManifoldCF.readLong(is));
+      if (version >= 6)
+        job.setMaxInterval(ManifoldCF.readLong(is));
       job.setExpiration(ManifoldCF.readLong(is));
       job.setReseedInterval(ManifoldCF.readLong(is));
       job.setPriority(ManifoldCF.readDword(is));



Mime
View raw message