Initial Seg Data Server Net platform
This commit is contained in:
14
backend/app/modules/system/tasks.py
Normal file
14
backend/app/modules/system/tasks.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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 == "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
|
||||
|
||||
Reference in New Issue
Block a user