git commit -a -m add additional considtion on checking if DictionaryUpdater has crash, a=chris

Chris Pollett [2022-08-10 07:Aug:th]
git commit -a -m add additional considtion on checking if DictionaryUpdater has crash, a=chris
Filename
src/executables/QueueServer.php
diff --git a/src/executables/QueueServer.php b/src/executables/QueueServer.php
index e18f4b0fe..778139040 100644
--- a/src/executables/QueueServer.php
+++ b/src/executables/QueueServer.php
@@ -1312,6 +1312,7 @@ class QueueServer implements CrawlConstants
                 $this->crawl_time;
         }
         $this->last_next_partition_to_add = -1;
+        $this->start_dictionary_time = -1
         $archive_exists = false;
         if (file_exists($dir)) {
             $archive_info = $class_name::getArchiveInfo($dir);
@@ -1770,9 +1771,11 @@ class QueueServer implements CrawlConstants
            previous partition
          */
         clearstatcache(); // to make sure filemtime below not cached
+        $time = time();
         if ($this->last_next_partition_to_add < $next_partition_to_add &&
             $next_partition_to_add < $save_partition) {
             $this->last_next_partition_to_add = $next_partition_to_add;
+            $this->start_dictionary_time = $time;
             $options = "run {$this->channel} '$bundle_name'";
             L\crawlLog("Exec'ing DictionaryUpdater with parameters: " .
                 $options);
@@ -1780,7 +1783,8 @@ class QueueServer implements CrawlConstants
                 "/executables/DictionaryUpdater.php", $options);
         } else if ($this->last_next_partition_to_add ==
             $next_partition_to_add && $next_partition_to_add < $save_partition
-            && time() > filemtime($next_partition_file) + 5 * C\LOG_TIMEOUT) {
+            && $time > filemtime($next_partition_file) + 5 * C\LOG_TIMEOUT
+            && $time > $this->start_dictionary_time +  5 * C\LOG_TIMEOUT) {
             L\crawlLog("DictionaryUpdater seems to have crashed, exiting ".
                 "Indexer");
             exit();
ViewGit