瀏覽代碼

dont load sonic binary if sonic backend is not enabled

Nick Sweeting 1 年之前
父節點
當前提交
b1a17689cd
共有 3 個文件被更改,包括 3 次插入4 次删除
  1. 1 2
      archivebox/plugins_search/sonic/apps.py
  2. 1 1
      pyproject.toml
  3. 1 1
      uv.lock

+ 1 - 2
archivebox/plugins_search/sonic/apps.py

@@ -51,7 +51,6 @@ class SonicConfig(BaseConfigSet):
 SONIC_CONFIG = SonicConfig()
 SONIC_CONFIG = SonicConfig()
 
 
 
 
-
 class SonicBinary(BaseBinary):
 class SonicBinary(BaseBinary):
     name: BinName = SONIC_CONFIG.SONIC_BINARY
     name: BinName = SONIC_CONFIG.SONIC_BINARY
     binproviders_supported: List[InstanceOf[BinProvider]] = [brew, env]   # TODO: add cargo
     binproviders_supported: List[InstanceOf[BinProvider]] = [brew, env]   # TODO: add cargo
@@ -121,7 +120,7 @@ class SonicSearchPlugin(BasePlugin):
 
 
     hooks: List[InstanceOf[BaseHook]] = [
     hooks: List[InstanceOf[BaseHook]] = [
         SONIC_CONFIG,
         SONIC_CONFIG,
-        SONIC_BINARY,
+        *([SONIC_BINARY] if (SEARCH_BACKEND_CONFIG.SEARCH_BACKEND_ENGINE == 'sonic' or SONIC_LIB) else []),
         SONIC_SEARCH_BACKEND,
         SONIC_SEARCH_BACKEND,
     ]
     ]
 
 

+ 1 - 1
pyproject.toml

@@ -1,6 +1,6 @@
 [project]
 [project]
 name = "archivebox"
 name = "archivebox"
-version = "0.8.5rc34"
+version = "0.8.5rc36"
 requires-python = ">=3.10"
 requires-python = ">=3.10"
 description = "Self-hosted internet archiving solution."
 description = "Self-hosted internet archiving solution."
 authors = [{name = "Nick Sweeting", email = "[email protected]"}]
 authors = [{name = "Nick Sweeting", email = "[email protected]"}]

+ 1 - 1
uv.lock

@@ -41,7 +41,7 @@ wheels = [
 
 
 [[package]]
 [[package]]
 name = "archivebox"
 name = "archivebox"
-version = "0.8.5rc34"
+version = "0.8.5rc35"
 source = { editable = "." }
 source = { editable = "." }
 dependencies = [
 dependencies = [
     { name = "atomicwrites" },
     { name = "atomicwrites" },