rustploy 0.1.36

Rustploy PaaS daemon — lightweight self-hosted deployment platform
1
2
3
4
5
6
7
8
9
10
11
12
//! `Command::DeployQueueReorder`: reordena a fila global (arrastar na GUI).

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

/// Reordena a fila para a ordem dada (ids de deployment). Ids desconhecidos são
/// ignorados; enfileirados omitidos vão ao fim preservando a ordem relativa.
pub async fn handle(state: AppState, order: Vec<String>) -> RpResponse {
    state.deploy_queue.reorder(&order);
    state.bus.publish(Event::DeployQueueChanged);
    RpResponse::Ok
}