Agent compiling

This commit is contained in:
Kinesin Data Technologies Incorporated
2022-10-05 09:25:11 -03:00
parent ca9a32c032
commit 5a4c5034a3
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -51,7 +51,7 @@ pub struct GlobalConfig {
pub ip: String, pub ip: String,
pub port: u32, pub port: u32,
pub resources: TaskResources, pub resources: TaskResources,
pub tracker: mpsc::UnboundedSender<TrackerMessage>, pub storage: mpsc::UnboundedSender<StorageMessage>,
pub executor: mpsc::UnboundedSender<ExecutorMessage>, pub executor: mpsc::UnboundedSender<ExecutorMessage>,
} }
@@ -66,14 +66,14 @@ impl GlobalConfig {
local_executor::start(*workers as usize, exe_rx); local_executor::start(*workers as usize, exe_rx);
// Tracker // Tracker
let (tracker, trx) = mpsc::unbounded_channel(); let (storage, trx) = mpsc::unbounded_channel();
noop_tracker::start(trx); waterfall::storage::noop::start(trx);
GlobalConfig { GlobalConfig {
ip: spec.ip.clone(), ip: spec.ip.clone(),
port: spec.port, port: spec.port,
resources: spec.resources.clone(), resources: spec.resources.clone(),
tracker, storage,
executor, executor,
} }
} }
+3 -3
View File
@@ -27,16 +27,16 @@ async fn submit_task(
) -> impl Responder { ) -> impl Responder {
let (response, rx) = oneshot::channel(); let (response, rx) = oneshot::channel();
let submission = data.into_inner(); let submission = details.into_inner();
let trx = data.tracker.clone();
let (_, kill) = oneshot::channel();
data.executor data.executor
.send(ExecutorMessage::ExecuteTask { .send(ExecutorMessage::ExecuteTask {
details: submission.details, details: submission.details,
output_options: submission.output_options, output_options: submission.output_options,
varmap: submission.varmap, varmap: submission.varmap,
response, response,
kill,
}) })
.unwrap(); .unwrap();
+3 -3
View File
@@ -105,9 +105,9 @@ fn validate_task(details: &TaskDetails, max_capacities: &[TaskResources]) -> Res
/// Contains specifics on how to run a local task /// Contains specifics on how to run a local task
#[derive(Serialize, Deserialize, Clone, Debug)] #[derive(Serialize, Deserialize, Clone, Debug)]
pub struct TaskSubmission { pub struct TaskSubmission {
details: TaskDetails, pub details: TaskDetails,
varmap: VarMap, pub varmap: VarMap,
output_options: TaskOutputOptions, pub output_options: TaskOutputOptions,
} }
async fn submit_task( async fn submit_task(