Phase 2: Docker and OIDC auth
This commit is contained in:
@@ -7,12 +7,15 @@ confirmations/dry-runs.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import shlex
|
||||
from dataclasses import dataclass
|
||||
from typing import Mapping
|
||||
|
||||
from media_library_viewer_api.clients.ssh import CommandResult, RemoteSSHClient
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class JobTemplate:
|
||||
@@ -56,4 +59,5 @@ def run_job(ssh: RemoteSSHClient, job_key: str, path: str, timeout: int = 600) -
|
||||
"""Render and execute a configured job template for a selected remote path."""
|
||||
template = JOB_TEMPLATES[job_key]
|
||||
command = template.render({"path": path})
|
||||
logger.info("Executing job template key=%s path=%s timeout=%s", job_key, path, timeout)
|
||||
return ssh.run(command, timeout=timeout)
|
||||
|
||||
Reference in New Issue
Block a user