|
|
@ -17,26 +17,20 @@ use color_eyre::Result; |
|
|
|
use crate::{processor::Processor, settings::ProcessorSettings as Settings}; |
|
|
|
use crate::{processor::Processor, settings::ProcessorSettings as Settings}; |
|
|
|
use optics_base::agent::OpticsAgent; |
|
|
|
use optics_base::agent::OpticsAgent; |
|
|
|
|
|
|
|
|
|
|
|
async fn _main(settings: Settings) -> Result<()> { |
|
|
|
async fn _main() -> Result<()> { |
|
|
|
let processor = Processor::from_settings(settings).await?; |
|
|
|
|
|
|
|
processor.run_all().await?; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ok(()) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn setup() -> Result<Settings> { |
|
|
|
|
|
|
|
color_eyre::install()?; |
|
|
|
color_eyre::install()?; |
|
|
|
let settings = Settings::new()?; |
|
|
|
let settings = Settings::new()?; |
|
|
|
settings.base.tracing.try_init_tracing()?; |
|
|
|
settings.base.tracing.try_init_tracing()?; |
|
|
|
Ok(settings) |
|
|
|
|
|
|
|
|
|
|
|
let agent = Processor::from_settings(settings).await?; |
|
|
|
|
|
|
|
agent.run_all().await?; |
|
|
|
|
|
|
|
Ok(()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fn main() -> Result<()> { |
|
|
|
fn main() -> Result<()> { |
|
|
|
let settings = setup()?; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tokio::runtime::Builder::new_current_thread() |
|
|
|
tokio::runtime::Builder::new_current_thread() |
|
|
|
.enable_all() |
|
|
|
.enable_all() |
|
|
|
.build() |
|
|
|
.build() |
|
|
|
.unwrap() |
|
|
|
.unwrap() |
|
|
|
.block_on(_main(settings)) |
|
|
|
.block_on(_main()) |
|
|
|
} |
|
|
|
} |
|
|
|