rustploy 0.1.6

Rustploy PaaS daemon — lightweight self-hosted deployment platform
1
2
3
4
5
6
7
8
9
10
11
//! `Command::JobRunHistory`: últimas execuções de um job.

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

pub async fn handle(state: AppState, job_id: String, limit: usize) -> RpResponse {
    match crate::store::job_run::list_for_job(&state.db, &job_id, limit).await {
        Ok(runs) => RpResponse::JobRuns(runs),
        Err(e) => RpResponse::err("DatabaseError", e.to_string()),
    }
}