File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/server/routes/api/document Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,9 @@ import { getPubmedCitation } from '../../../../util/pubmed';
1717const INDRA_STATEMENTS_URL = INDRA_DB_BASE_URL + 'statements/from_agents' ;
1818const SORT_BY_DATE = false ; // TODO remove
1919
20- const FETCH_RETRIES = 3 ;
20+ const FETCH_RETRIES = 20 ;
2121const FETCH_RETRY_DELAY = 3000 ;
22+ const FETCH_RETRY_DELAY_DELTA = 1000 ;
2223
2324const SUB_MODIFICATION_TYPES = [ 'Phosphorylation' , 'Dephosphorylation' , 'Dephosphorylation' ,
2425 'Deubiquitination' , 'Methylation' , 'Demethylation' ] ;
@@ -38,7 +39,7 @@ let sortByDate = SORT_BY_DATE;
3839const fetchRetry = FetchRetry ( fetch ) ;
3940const fetchRetryUrl = ( url , opts ) => {
4041 let retryOpts = {
41- retryDelay : FETCH_RETRY_DELAY ,
42+ retryDelay : FETCH_RETRY_DELAY + Math . round ( Math . random ( ) * FETCH_RETRY_DELAY_DELTA ) ,
4243 retryOn : function ( attempt , error , response ) {
4344 // retry on any network error, or 4xx or 5xx status codes
4445 const { statusText, status, ok } = response ;
You can’t perform that action at this time.
0 commit comments