소스 검색

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 년 전
부모
커밋
572cf04f80
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      tripal_feature/indexFeatures.php

+ 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 
    // Iterate through features that need to be indexed 
    $interval = intval($count * 0.01);
    $interval = intval($count * 0.01);
+   if($interval >= 0){
+      $interval = 1;
+   }
    foreach($chado_features as $chado_feature){
    foreach($chado_features as $chado_feature){
 
 
       // update the job status every 1% features
       // update the job status every 1% features