core: seams for parallel work: services.rs (boot), graph.rs (documents for /proc), activation.rs
This commit is contained in:
+1
-17
@@ -65,23 +65,7 @@ impl Host {
|
||||
exit: watch::channel(false).0,
|
||||
components: components::Components::default(),
|
||||
}));
|
||||
let boot: Vec<Value> = serde_json::from_slice(
|
||||
&tokio::fs::read(host.0.world.root.join("config/boot.json")).await?,
|
||||
)?;
|
||||
for service in boot {
|
||||
let result = host
|
||||
.route(
|
||||
"core".into(),
|
||||
Some(json!(Uuid::now_v7().to_string())),
|
||||
service["method"].as_str().unwrap_or("").into(),
|
||||
service["params"].clone(),
|
||||
true,
|
||||
)
|
||||
.await;
|
||||
if let Err(e) = result {
|
||||
host.0.journal.write("core", "core", "core", &e.to_string());
|
||||
}
|
||||
}
|
||||
host.boot().await?;
|
||||
Ok(host)
|
||||
}
|
||||
/// Register a native plugin for subsequent calls.
|
||||
|
||||
Reference in New Issue
Block a user