]> _ Git - cubist_cms-back.git/commitdiff
wait #7804 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Oct 2025 14:00:18 +0000 (16:00 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Oct 2025 14:00:18 +0000 (16:00 +0200)
src/app/Magic/Search.php

index b3b7a2354af2a2c58e06da7bc42d2e18396e9b23..8500bea9f7b7a54dee0dbd20d173841f56effd89 100644 (file)
@@ -267,7 +267,14 @@ class Search
             echo 'Indexing ' . $variant . ' - ' . $locale . ' | ' . $url . "\n";
 
             $indexed[$url] = true;
-            Elasticsearch::index($data);
+            for ($i = 5; $i >= 0; $i--) {
+                try {
+                    Elasticsearch::index($data);
+                } catch (\Exception $e) {
+                    sleep(30);
+                    break;
+                }
+            }
         }
     }