Pass config to Runner

This commit is contained in:
Joscha 2023-08-08 23:43:49 +02:00
parent 7e8fd7a9aa
commit 3a4a4c1cfa
2 changed files with 8 additions and 4 deletions

View file

@ -124,7 +124,7 @@ async fn run() -> somehow::Result<()> {
} }
} }
Command::Runner => { Command::Runner => {
let runner = Runner::new(); let runner = Runner::new(config);
select! { select! {
_ = wait_for_signal() => {} _ = wait_for_signal() => {}

View file

@ -1,10 +1,14 @@
use tracing::error; use tracing::error;
pub struct Runner {} use crate::config::Config;
pub struct Runner {
config: &'static Config,
}
impl Runner { impl Runner {
pub fn new() -> Self { pub fn new(config: &'static Config) -> Self {
Self {} Self { config }
} }
pub async fn run(&self) { pub async fn run(&self) {