rustploy 0.1.4

Rustploy PaaS daemon — lightweight self-hosted deployment platform
1
2
3
4
5
6
7
8
9
10
11
//! `Command::GetJobLogs`: linhas do log de uma execução de job.

use crate::bootstrap::state::AppState;
use shared::Response as RpResponse;

pub async fn handle(state: AppState, job_run_id: String) -> RpResponse {
    match crate::store::job_log::get_for_run(&state.db, &job_run_id).await {
        Ok(lines) => RpResponse::JobLogs(lines),
        Err(e) => RpResponse::err("DatabaseError", e.to_string()),
    }
}