Set up runner subcommand
This commit is contained in:
parent
7635af88cd
commit
4f69f5cb21
3 changed files with 25 additions and 0 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -1,5 +1,6 @@
|
|||
mod args;
|
||||
mod config;
|
||||
mod runner;
|
||||
mod server;
|
||||
mod somehow;
|
||||
|
||||
|
|
@ -16,6 +17,7 @@ use tracing_subscriber::{
|
|||
use crate::{
|
||||
args::{Args, Command, NAME, VERSION},
|
||||
config::Config,
|
||||
runner::Runner,
|
||||
server::Server,
|
||||
};
|
||||
|
||||
|
|
@ -121,6 +123,14 @@ async fn run() -> somehow::Result<()> {
|
|||
_ = server.shut_down() => {}
|
||||
}
|
||||
}
|
||||
Command::Runner => {
|
||||
let runner = Runner::new();
|
||||
|
||||
select! {
|
||||
_ = wait_for_signal() => {}
|
||||
_ = runner.run() => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue