fix: CLI lazy NeuralScorer import (torch only on demand), health_check use subprocess.run for systemctl
This commit is contained in:
@@ -49,17 +49,14 @@ def get_backup_status():
|
||||
|
||||
def get_job_status():
|
||||
units = [
|
||||
"openclaw-secondbrain-ingest-memory.service",
|
||||
"openclaw-secondbrain-index-vectors.service",
|
||||
"openclaw-secondbrain-review.service",
|
||||
"openclaw-secondbrain-heartbeat.service",
|
||||
"openclaw-secondbrain-verify-pending.service",
|
||||
"openclaw-worker@secondbrain_manager.service", # aktueller Worker-Dienst
|
||||
"secondbrain-dashboard.service", # Dashboard
|
||||
]
|
||||
status = {}
|
||||
for u in units:
|
||||
try:
|
||||
out = subprocess.check_output(["systemctl", "is-active", u], text=True, stderr=subprocess.DEVNULL).strip()
|
||||
status[u] = out
|
||||
out = subprocess.run(["systemctl", "is-active", u], capture_output=True, text=True, check=False)
|
||||
status[u] = out.stdout.strip() or "inactive"
|
||||
except Exception:
|
||||
status[u] = "unknown"
|
||||
return status
|
||||
|
||||
@@ -30,7 +30,6 @@ from .engram import Engram, Grounding
|
||||
from .retriever import Retriever
|
||||
from .chroma_store import ChromaStore
|
||||
from .graph_view import generate_graph_html
|
||||
from .neural_scorer import NeuralScorer
|
||||
from .loop_detector import LoopDetector
|
||||
from .error_healer import ErrorHealer
|
||||
|
||||
@@ -209,6 +208,7 @@ def cmd_heal(args):
|
||||
|
||||
|
||||
def cmd_neural_train(args):
|
||||
from .neural_scorer import NeuralScorer # lazy: needs torch
|
||||
store = get_store()
|
||||
scorer = NeuralScorer()
|
||||
egs = store.get_all(limit=10000)
|
||||
|
||||
Reference in New Issue
Block a user