16 lines
770 B
Python
16 lines
770 B
Python
from __future__ import annotations
|
|
|
|
from ...commands import CommandSpec, bash
|
|
from ...config import settings
|
|
|
|
|
|
def build_system_task(job_type: str, params: dict, conda_env: str) -> CommandSpec | None:
|
|
if job_type == "system.backup":
|
|
return CommandSpec(bash(settings.source_root / "Back_Up.sh"), settings.source_root, "run legacy backup script")
|
|
if job_type == "system.check_graph_card":
|
|
return CommandSpec(bash(settings.source_root / "Check_Graph_Card.sh"), settings.source_root, "run legacy GPU card detection script")
|
|
if job_type == "mock.echo":
|
|
message = params.get("message", "Seg Data Server mock job")
|
|
return CommandSpec(["python", "-c", f"print({message!r})"], settings.project_root, "test job runner")
|
|
return None
|