RefreshJob loads max 10 articles at a time; there's a delay of 1 second for the next...
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / actions / mediawiki / connect / MediaWikiConnector.java
index 7d42d9b..07cc568 100644 (file)
@@ -15,7 +15,6 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import net.sourceforge.phpeclipse.wiki.actions.mediawiki.config.IWikipedia;
-import net.sourceforge.phpeclipse.wiki.actions.mediawiki.config.WikipediaDE;
 import net.sourceforge.phpeclipse.wiki.actions.mediawiki.exceptions.MethodException;
 import net.sourceforge.phpeclipse.wiki.actions.mediawiki.exceptions.PageNotEditableException;
 import net.sourceforge.phpeclipse.wiki.actions.mediawiki.exceptions.UnexpectedAnswerException;
@@ -252,7 +251,8 @@ public class MediaWikiConnector {
     return result;
   }
 
-  public ArrayList loadXML(IWikipedia config, String actionURL, String pages) throws UnexpectedAnswerException, MethodException {
+  public ArrayList loadXML(IWikipedia config, String actionURL, String pages) throws UnexpectedAnswerException, MethodException , InterruptedException{
+    storeThrottle.delay();  
     PostMethod method = new PostMethod(actionURL);
     method.setFollowRedirects(false);
     method.addRequestHeader("User-Agent", userAgent);
@@ -503,7 +503,7 @@ public class MediaWikiConnector {
     } catch (UnexpectedAnswerException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
-    } catch (MethodException e) {
+    } catch (Exception e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
     }