debug
This commit is contained in:
@@ -5,7 +5,7 @@ import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
from app.core.config import settings
|
||||
from app.services.sync_push_service import push_runtime_projection_now
|
||||
from app.services.sync_push_service import pull_detect_task_batch_now, push_runtime_projection_now
|
||||
from app.services.runtime_settings_service import get_runtime_settings
|
||||
from app.services.worker_control_service import _run_systemctl, start_worker, stop_worker
|
||||
|
||||
@@ -104,6 +104,14 @@ def runtime_action(action: str) -> tuple[bool, str, dict]:
|
||||
"refresh_runtime": True,
|
||||
**(data or {}),
|
||||
}
|
||||
if action == "pull_tasks":
|
||||
ok, message, data = pull_detect_task_batch_now()
|
||||
return ok, message, {
|
||||
"action": action,
|
||||
"poll_after_seconds": 2,
|
||||
"refresh_runtime": True,
|
||||
**(data or {}),
|
||||
}
|
||||
return False, f"不支持的运行时动作: {action}", {
|
||||
"action": action,
|
||||
"poll_after_seconds": 0,
|
||||
|
||||
Reference in New Issue
Block a user