rustploy 0.1.21

Rustploy PaaS daemon — lightweight self-hosted deployment platform
1
2
3
4
5
6
7
8
9
10
11
12
13
//! `Command::DeployQueuePromote`: fura a fila (move um enfileirado para o
//! início).

use crate::bootstrap::state::AppState;
use shared::{Event, Response as RpResponse};

/// Move um deploy enfileirado para o início da fila ("furar fila"). No-op se o
/// id não estiver na fila (já rodando/terminado).
pub async fn handle(state: AppState, deployment_id: String) -> RpResponse {
    state.deploy_queue.promote(&deployment_id);
    state.bus.publish(Event::DeployQueueChanged);
    RpResponse::Ok
}