File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/components/map-projects Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -875,16 +875,15 @@ const MapProject = () => {
875875 setEndMatchingAt ( moment ( ) )
876876 setLoadingMatches ( false )
877877 if ( inAIAssistantGroup )
878- setTimeout ( runBulkAIAnalysis , 1000 )
878+ setTimeout ( ( ) => runBulkAIAnalysis ( rows ) , 1000 )
879879 } ;
880880
881- const runBulkAIAnalysis = async ( ) => {
881+ const runBulkAIAnalysis = async ( _rows ) => {
882882 setBulkAIAnalysisStartedAt ( moment ( ) )
883- for ( let index = 0 ; index < rows . length ; index ++ ) {
883+ for ( let index = 0 ; index < _rows . length ; index ++ ) {
884884 if ( abortRef . current ) break ;
885885
886- const row = rows [ index ] ;
887- await fetchRecommendation ( row ) ; // wait for completion
886+ await fetchRecommendation ( _rows [ index ] ) ; // wait for completion
888887 await new Promise ( resolve => setTimeout ( resolve , 15000 ) ) ; // 15s delay
889888 }
890889
@@ -996,6 +995,8 @@ const MapProject = () => {
996995 setAlert ( false )
997996 if ( isAnyValidColumn ( ) ) {
998997 setStartMatchingAt ( moment ( ) )
998+ setBulkAIAnalysisStartedAt ( null )
999+ setBulkAIAnalysisEndedAt ( null )
9991000 setLoadingMatches ( true )
10001001 getRowsResults ( data )
10011002 } else {
You can’t perform that action at this time.
0 commit comments