mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -183,6 +183,7 @@ public abstract class AbstractRemoteMetadataSource {
|
||||
log.warn("Error in trying operation " + operationId + " " + retry + " " + warning + ", retrying !", e);
|
||||
|
||||
} finally {
|
||||
this.lastRequest = System.currentTimeMillis();
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
@@ -262,5 +263,7 @@ public abstract class AbstractRemoteMetadataSource {
|
||||
*/
|
||||
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="urlSearch" value="${pubmed.url.search}"/>
|
||||
<property name="generateQueryForItem" ref="pubmedService"></property>
|
||||
<property name="interRequestTime" value="500"/>
|
||||
<property name="maxRetry" value="2"/>
|
||||
<property name="supportedExtensions">
|
||||
<list>
|
||||
<value>xml</value>
|
||||
@@ -191,4 +193,4 @@
|
||||
<constructor-arg value="dc.identifier.other"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
</beans>
|
||||
|
Reference in New Issue
Block a user