kllk
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled

This commit is contained in:
nose
2025-12-24 17:58:57 -08:00
parent d7fc8c4576
commit df24a0cb44
47 changed files with 8039 additions and 82 deletions

View File

@@ -1,7 +1,6 @@
"""Worker cmdlet: Display workers table in ResultTable format."""
from __future__ import annotations
import json
import sys
from dataclasses import dataclass
from datetime import datetime, timezone
@@ -22,11 +21,11 @@ CMDLET = Cmdlet(
summary="Display workers table in result table format.",
usage=".worker [status] [-limit N] [@N]",
arg=[
CmdletArg("status", description="Filter by status: running, completed, error (default: all)"),
CmdletArg("limit", type="integer", description="Limit results (default: 100)"),
CmdletArg("@N", description="Select worker by index (1-based) and display full logs"),
CmdletArg("-id", description="Show full logs for a specific worker"),
CmdletArg("-clear", type="flag", description="Remove completed workers from the database"),
CmdletArg("status", description="Filter by status: running, completed, error (default: all)", requires_db=True),
CmdletArg("limit", type="integer", description="Limit results (default: 100)", requires_db=True),
CmdletArg("@N", description="Select worker by index (1-based) and display full logs", requires_db=True),
CmdletArg("-id", description="Show full logs for a specific worker", requires_db=True),
CmdletArg("-clear", type="flag", description="Remove completed workers from the database", requires_db=True),
],
detail=[
"- Shows all background worker tasks and their output",
@@ -63,7 +62,7 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
selection_requested = bool(selection_indices) and isinstance(result, list) and len(result) > 0
if _has_help_flag(args_list):
log(json.dumps(CMDLET, ensure_ascii=False, indent=2))
ctx.emit(CMDLET.__dict__)
return 0
options = _parse_worker_args(args_list)