From e656920f7b68d8a4ff01d0392b0816609ead44c2 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 29 Feb 2024 13:43:30 +0300 Subject: [PATCH] search-reindex-fix --- services/search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/search.py b/services/search.py index a8d7c471..0474047f 100644 --- a/services/search.py +++ b/services/search.py @@ -1,6 +1,7 @@ import json import os from multiprocessing import Manager +import threading from opensearchpy import OpenSearch @@ -53,7 +54,7 @@ class SearchService: self.client = None # Используем менеджер для создания Lock и Value - self.lock = self.manager.Lock() + self.lock = threading.Lock() self.initialized_flag = self.manager.Value('i', 0) # Only initialize the instance if it's not already initialized