@@ -1249,9 +1249,7 @@ const MapProject = () => {
12491249 for ( let index = 0 ; index < _rows . length ; index ++ ) {
12501250 if ( abortRef . current ) break ;
12511251
1252- await fetchRecommendation ( _rows [ index ] ) ; // wait for completion
1253- if ( index !== _rows . length - 1 )
1254- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
1252+ await fetchRecommendation ( _rows [ index ] ) ;
12551253 }
12561254 const now = moment ( )
12571255 setBulkAIAnalysisEndedAt ( now )
@@ -2486,11 +2484,11 @@ const MapProject = () => {
24862484 console . error ( 'AI ASSISTANT is not enabled for you.' )
24872485 return false
24882486 }
2489- markAlgo ( __index , 'recommend' , 0 )
24902487 let _candidates = flatten ( map ( filter ( selectedAlgoIds , algoId => ! [ 'ocl-ciel-bridge' , 'ocl-scispacy-loinc' ] . includes ( algoId ) ) , algoId => find ( allCandidatesRef . current [ algoId ] , c => c . row ?. __index === __index ) ?. results || [ ] ) )
24912488 let _bridgeCandidates = find ( allCandidatesRef . current [ 'ocl-ciel-bridge' ] , c => c . row ?. __index === __index ) ?. results || [ ]
24922489 let _scispacyCandidates = find ( allCandidatesRef . current [ 'ocl-scispacy-loinc' ] , c => c . row ?. __index === __index ) ?. results || [ ]
24932490 if ( isNumber ( __index ) && repoVersion && project . url && ! analysis [ __index ] && [ ..._candidates , ..._bridgeCandidates , ..._scispacyCandidates ] ?. length > 0 ) {
2491+ markAlgo ( __index , 'recommend' , 0 )
24942492 let rowData = prepareRow ( __row , true , true )
24952493 const payload = {
24962494 project : getProjectMetadata ( ) ,
@@ -2525,6 +2523,8 @@ const MapProject = () => {
25252523 setAlert ( { message : errorMessage , severity : 'error' } )
25262524 return false
25272525 }
2526+ } else {
2527+ markAlgo ( __index , 'recommend' , analysis [ __index ] ? 1 : - 3 )
25282528 }
25292529 return false
25302530 }
0 commit comments