File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
app/code/Magento/Elasticsearch/Model/Adapter Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,11 @@ public function cleanIndex($storeId, $mappedIndexerId)
243243
244244 // remove index if already exists
245245 if ($ this ->client ->indexExists ($ newIndexName )) {
246- $ this ->client ->deleteIndex ($ newIndexName );
246+ try {
247+ $ this ->client ->deleteIndex ($ newIndexName );
248+ } catch (\Exception $ e ) {
249+ $ this ->logger ->critical ($ e );
250+ }
247251 }
248252
249253 // prepare new index
@@ -372,7 +376,11 @@ public function updateAlias($storeId, $mappedIndexerId)
372376
373377 // remove obsolete index
374378 if ($ oldIndex ) {
375- $ this ->client ->deleteIndex ($ oldIndex );
379+ try {
380+ $ this ->client ->deleteIndex ($ oldIndex );
381+ } catch (\Exception $ e ) {
382+ $ this ->logger ->critical ($ e );
383+ }
376384 unset($ this ->indexByCode [$ mappedIndexerId . '_ ' . $ storeId ]);
377385 }
378386
You can’t perform that action at this time.
0 commit comments