fn stash(message: StashMessage, state: &SharedState) -> Message {
    let (matching, mismatching) = {
        let mut state = state.lock().unwrap();
        let (matching, mismatching) =
            state.tasks_in_statuses(Some(message.task_ids), vec![TaskStatus::Queued]);

        for task_id in &matching {
            state.change_status(*task_id, TaskStatus::Stashed);
        }

        (matching, mismatching)
    };

    let message = "Tasks are stashed";
    let response = compile_task_response(message, matching, mismatching);
    return create_success_message(response);
}
/// Stash specific queued tasks.
/// They won't be executed until enqueued again or explicitely started
Stash specific queued tasks.
They won't be executed until enqueued again or explicitely started
Stash specific queued tasks . They won ' t be executed until enqueued again or explicitely started
fn stash(message: StashMessage, state: &SharedState) -> Message {
    let (matching, mismatching) = {
        let mut state = state.lock().unwrap();
        let (matching, mismatching) =
            state.tasks_in_statuses(Some(message.task_ids), vec![TaskStatus::Queued]);
        for task_id in &matching {
            state.change_status(*task_id, TaskStatus::Stashed);
        }
        (matching, mismatching)
    };
    let message = "Tasks are stashed";
    let response = compile_task_response(message, matching, mismatching);
    return create_success_message(response);
}
fn stash ( message : StashMessage , state : & SharedState ) -> Message { let ( matching , mismatching ) = { let mut state = state . lock ( ) . unwrap ( ) ; let ( matching , mismatching ) = state . tasks_in_statuses ( Some ( message . task_ids ) , vec ! [ TaskStatus Queued ] ) ; for task_id in & matching { state . change_status ( * task_id , TaskStatus :: Stashed ) ; } ( matching , mismatching ) } ; let message = " " ; let response = compile_task_response ( message , matching , mismatching ) ; return create_success_message ( response ) ; }
Stash specific queued tasks.
Stash specific queued tasks .
message
StashMessage
state
&SharedState
message
StashMessage
state
&SharedState