mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
100302: Fix issue with Pubmed too many requests
This commit is contained in:
@@ -501,4 +501,4 @@ public class PubmedImportMetadataSourceServiceImpl extends AbstractImportMetadat
|
|||||||
this.urlSearch = urlSearch;
|
this.urlSearch = urlSearch;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -183,6 +183,7 @@ public abstract class AbstractRemoteMetadataSource {
|
|||||||
log.warn("Error in trying operation " + operationId + " " + retry + " " + warning + ", retrying !", e);
|
log.warn("Error in trying operation " + operationId + " " + retry + " " + warning + ", retrying !", e);
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
|
this.lastRequest = System.currentTimeMillis();
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,5 +263,7 @@ public abstract class AbstractRemoteMetadataSource {
|
|||||||
*/
|
*/
|
||||||
public abstract void init() throws Exception;
|
public abstract void init() throws Exception;
|
||||||
|
|
||||||
|
public void setInterRequestTime(final long interRequestTime) {
|
||||||
|
this.interRequestTime = interRequestTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -49,6 +49,8 @@
|
|||||||
<property name="urlFetch" value="${pubmed.url.fetch}"/>
|
<property name="urlFetch" value="${pubmed.url.fetch}"/>
|
||||||
<property name="urlSearch" value="${pubmed.url.search}"/>
|
<property name="urlSearch" value="${pubmed.url.search}"/>
|
||||||
<property name="generateQueryForItem" ref="pubmedService"></property>
|
<property name="generateQueryForItem" ref="pubmedService"></property>
|
||||||
|
<property name="interRequestTime" value="500"/>
|
||||||
|
<property name="maxRetry" value="2"/>
|
||||||
<property name="supportedExtensions">
|
<property name="supportedExtensions">
|
||||||
<list>
|
<list>
|
||||||
<value>xml</value>
|
<value>xml</value>
|
||||||
@@ -191,4 +193,4 @@
|
|||||||
<constructor-arg value="dc.identifier.other"/>
|
<constructor-arg value="dc.identifier.other"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
Reference in New Issue
Block a user