supervisor cleanup, documentation and minor fixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//! Supervisor builder for configuration and initialization.
|
||||
|
||||
use crate::error::{SupervisorError, SupervisorResult};
|
||||
use crate::Supervisor;
|
||||
use crate::supervisor::Supervisor;
|
||||
use hero_job_client::ClientBuilder;
|
||||
|
||||
/// Builder for constructing a Supervisor instance
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
use hero_supervisor::SupervisorBuilder;
|
||||
use clap::Parser;
|
||||
use log::{error, info};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
/// Hero Supervisor - manages actors and dispatches jobs
|
||||
#[derive(Parser, Debug)]
|
||||
@@ -22,9 +22,10 @@ use std::sync::Arc;
|
||||
use std::fs;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
/// Load OpenRPC specification from docs/openrpc.json
|
||||
/// Load OpenRPC specification from docs/supervisor/openrpc.json
|
||||
fn load_openrpc_spec() -> Result<serde_json::Value, Box<dyn std::error::Error>> {
|
||||
let path = "../../docs/openrpc.json";
|
||||
// Path relative to the workspace root (where Cargo.toml is)
|
||||
let path = concat!(env!("CARGO_MANIFEST_DIR"), "/../../docs/supervisor/openrpc.json");
|
||||
let content = fs::read_to_string(path)?;
|
||||
let spec = serde_json::from_str(&content)?;
|
||||
debug!("Loaded OpenRPC specification from: {}", path);
|
||||
|
||||
Reference in New Issue
Block a user