Agent compiling
This commit is contained in:
parent
ca9a32c032
commit
5a4c5034a3
@@ -51,7 +51,7 @@ pub struct GlobalConfig {
|
||||
pub ip: String,
|
||||
pub port: u32,
|
||||
pub resources: TaskResources,
|
||||
pub tracker: mpsc::UnboundedSender<TrackerMessage>,
|
||||
pub storage: mpsc::UnboundedSender<StorageMessage>,
|
||||
pub executor: mpsc::UnboundedSender<ExecutorMessage>,
|
||||
}
|
||||
|
||||
@@ -66,14 +66,14 @@ impl GlobalConfig {
|
||||
local_executor::start(*workers as usize, exe_rx);
|
||||
|
||||
// Tracker
|
||||
let (tracker, trx) = mpsc::unbounded_channel();
|
||||
noop_tracker::start(trx);
|
||||
let (storage, trx) = mpsc::unbounded_channel();
|
||||
waterfall::storage::noop::start(trx);
|
||||
|
||||
GlobalConfig {
|
||||
ip: spec.ip.clone(),
|
||||
port: spec.port,
|
||||
resources: spec.resources.clone(),
|
||||
tracker,
|
||||
storage,
|
||||
executor,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,16 +27,16 @@ async fn submit_task(
|
||||
) -> impl Responder {
|
||||
let (response, rx) = oneshot::channel();
|
||||
|
||||
let submission = data.into_inner();
|
||||
|
||||
let trx = data.tracker.clone();
|
||||
let submission = details.into_inner();
|
||||
|
||||
let (_, kill) = oneshot::channel();
|
||||
data.executor
|
||||
.send(ExecutorMessage::ExecuteTask {
|
||||
details: submission.details,
|
||||
output_options: submission.output_options,
|
||||
varmap: submission.varmap,
|
||||
response,
|
||||
kill,
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user