diff --git a/src/executors/local_executor.rs b/src/executors/local_executor.rs index 7e20c2c..38a1411 100644 --- a/src/executors/local_executor.rs +++ b/src/executors/local_executor.rs @@ -246,7 +246,7 @@ pub async fn start_local_executor( ..TaskAttempt::new() }, }; - response.send(attempt).unwrap(); + response.send(attempt.succeeded).unwrap(); })); } Stop {} => { diff --git a/src/executors/mod.rs b/src/executors/mod.rs index 221066a..f0a9e9f 100644 --- a/src/executors/mod.rs +++ b/src/executors/mod.rs @@ -1,6 +1,30 @@ use super::*; pub mod local_executor; +/// Messages for interacting with an Executor +#[derive(Debug)] +pub enum ExecutorMessage { + /// Validate a set of tasks. + /// Errors + /// Returns the vector of task issues + ValidateTask { + details: serde_json::Value, + response: oneshot::Sender>, + }, + + /// Execute the given task, along with enough information + /// Errors + /// Will return `Err` if the tasks are invalid, according to the executor + ExecuteTask { + details: serde_json::Value, + varmap: VarMap, + output_options: TaskOutputOptions, + response: oneshot::Sender, + kill: oneshot::Receiver<()>, + }, + Stop {}, +} + fn default_bytes() -> usize { 20480 } @@ -41,30 +65,6 @@ impl Default for TaskOutputOptions { } } -/// Messages for interacting with an Executor -#[derive(Debug)] -pub enum ExecutorMessage { - /// Validate a set of tasks. - /// Errors - /// Returns the vector of task issues - ValidateTask { - details: serde_json::Value, - response: oneshot::Sender>, - }, - - /// Execute the given task, along with enough information - /// Errors - /// Will return `Err` if the tasks are invalid, according to the executor - ExecuteTask { - details: serde_json::Value, - varmap: VarMap, - output_options: TaskOutputOptions, - response: oneshot::Sender, - kill: oneshot::Receiver<()>, - }, - Stop {}, -} - #[derive(Serialize, Deserialize, Debug, Clone)] pub struct TaskAttempt { #[serde(default)] diff --git a/src/storage/redis_store.rs b/src/storage/redis_store.rs index 229e5a0..fdde230 100644 --- a/src/storage/redis_store.rs +++ b/src/storage/redis_store.rs @@ -1,7 +1,5 @@ use super::*; -extern crate redis; - use futures::prelude::*; use redis::AsyncCommands;