Эх сурвалжийг харах

But in index feature. If the number of features is less than 100 a divide by zero error occurs when trying to calculate the percent complete.

spficklin 14 жил өмнө
parent
commit
572cf04f80

+ 3 - 0
tripal_feature/indexFeatures.php

@@ -77,6 +77,9 @@ function tripal_features_reindex ($max_sync,$job_id = NULL){
 
    // Iterate through features that need to be indexed 
    $interval = intval($count * 0.01);
+   if($interval >= 0){
+      $interval = 1;
+   }
    foreach($chado_features as $chado_feature){
 
       // update the job status every 1% features