/// Forward the start message to the task handler and respond to the client
Forward the start message to the task handler and respond to the client
Forward the start message to the task handler and respond to the client
fn start(message: StartMessage, sender: &Sender<Message>, state: &SharedState) -> Message {
    sender
        .send(Message::Start(message.clone()))
        .expect(SENDER_ERR);
    if !message.task_ids.is_empty() {
        let response = task_response_helper(
            "Tasks are being started",
            message.task_ids,
            vec![TaskStatus::Paused, TaskStatus::Queued, TaskStatus::Stashed],
            state,
        );
        return create_success_message(response);
    }
    return create_success_message("Daemon and all tasks are being resumed.");
}
fn start ( message : StartMessage , sender : & Sender < Message > , state : & SharedState ) -> Message { sender . send ( Message :: Start ( message . clone ( ) ) ) . expect ( SENDER_ERR ) ; if ! message . task_ids . is_empty ( ) { let response = task_response_helper ( " " , message . task_ids , vec ! [ TaskStatus Paused TaskStatus Queued TaskStatus Stashed ] , state , ) ; return create_success_message ( response ) ; } return create_success_message ( " " ) ; }
Forward the start message to the task handler and respond to the client
Forward the start message to the task handler and respond to the client
message
StartMessage
sender
&Sender<Message>
state
&SharedState