Browse Source

_collect_error_keywords 方法名称更改

klzhangweiya 3 weeks ago
parent
commit
fce1003d48

+ 3 - 3
SourceCode/TenderCrawler/app/adapters/data_collection_adapter_interface.py

@@ -99,7 +99,7 @@ class IDataCollectionAdapter(ABC):
                 utils.get_logger().error(f"==> {e}")
             # except Exception as e:
             #     raise Exception(f"采集数据失败: {e}")
-        self._collect_error_keywors()
+        self._collect_error_keywords()
 
     @abstractmethod
     def login(self, username: str, password: str) -> None:
@@ -148,7 +148,7 @@ class IDataCollectionAdapter(ABC):
             #     f"采集数据 超时 {self.cur_keyword} [{err_count}/{self._max_error_count}]"
             # )
 
-    def _collect_error_keywors(self):
+    def _collect_error_keywords(self):
         if not self._err_keywords:
             return
         for keyword, err_count in self._err_keywords.items():
@@ -162,7 +162,7 @@ class IDataCollectionAdapter(ABC):
                     del self._err_keywords[self.cur_keyword]  # 删除键
             except Exception as e:
                 utils.get_logger().error(f"失败: {e}")
-        self._collect_error_keywors()
+        self._collect_error_keywords()
 
     @abstractmethod
     def _collect(self, keyword: str) -> None: