Skip to content

Commit

Permalink
100302: Fix issue with Pubmed too many requests
Browse files Browse the repository at this point in the history
  • Loading branch information
YanaDePauw committed Mar 27, 2023
1 parent 4cdb662 commit 56aca5c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Expand Up @@ -501,4 +501,4 @@ public void setUrlSearch(String urlSearch) {
this.urlSearch = urlSearch;
}

}
}
Expand Up @@ -183,6 +183,7 @@ protected <T> T retry(Callable<T> callable) throws MetadataSourceException {
log.warn("Error in trying operation " + operationId + " " + retry + " " + warning + ", retrying !", e);

} finally {
this.lastRequest = System.currentTimeMillis();
lock.unlock();
}

Expand Down Expand Up @@ -262,5 +263,7 @@ protected void throwSourceExceptionHook() {
*/
public abstract void init() throws Exception;


public void setInterRequestTime(final long interRequestTime) {
this.interRequestTime = interRequestTime;
}
}
Expand Up @@ -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>
Expand Down Expand Up @@ -191,4 +193,4 @@
<constructor-arg value="dc.identifier.other"/>
</bean>

</beans>
</beans>

0 comments on commit 56aca5c

Please sign in to comment.