auto-sync: 2026-06-06 11:26:44
This commit is contained in:
@@ -9,6 +9,7 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
@@ -1165,7 +1166,9 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_
|
||||
@staticmethod
|
||||
def _revive_session(agent_id: str) -> bool:
|
||||
"""假死复活术:修改 sessions.json status 从 running 改为 idle"""
|
||||
sessions_path = Path.home() / ".openclaw" / "agents" / agent_id / "sessions" / "sessions.json"
|
||||
sessions_path = Path(os.environ.get(
|
||||
"OPENCLAW_HOME", str(Path.home() / ".openclaw")
|
||||
)) / "agents" / agent_id / "sessions" / "sessions.json"
|
||||
if not sessions_path.exists():
|
||||
return False
|
||||
try:
|
||||
@@ -1249,7 +1252,9 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_
|
||||
替代失效的 compactionCheckpoints 检测。
|
||||
"""
|
||||
result = {"status": "unknown", "lock_pid": None, "lock_pid_alive": False, "recent_compact": False}
|
||||
sessions_path = Path.home() / ".openclaw" / "agents" / agent_id / "sessions" / "sessions.json"
|
||||
sessions_path = Path(os.environ.get(
|
||||
"OPENCLAW_HOME", str(Path.home() / ".openclaw")
|
||||
)) / "agents" / agent_id / "sessions" / "sessions.json"
|
||||
if not sessions_path.exists():
|
||||
return result
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user