Skip to content

Commit

Permalink
Add support for pushgateway
Browse files Browse the repository at this point in the history
- Add writer that will suspend progressbars when writing to the it
  • Loading branch information
hatchan committed Jun 21, 2023
1 parent 77fd04d commit f277513
Show file tree
Hide file tree
Showing 6 changed files with 404 additions and 57 deletions.
7 changes: 4 additions & 3 deletions src/bin/am/commands.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anyhow::Result;
use clap::{Parser, Subcommand};
use indicatif::MultiProgress;

pub mod start;
pub mod system;
Expand All @@ -24,10 +25,10 @@ pub enum SubCommands {
MarkdownHelp,
}

pub async fn handle_command(app: Application) -> Result<()> {
pub async fn handle_command(app: Application, mp: MultiProgress) -> Result<()> {
match app.command {
SubCommands::Start(args) => start::handle_command(args).await,
SubCommands::System(args) => system::handle_command(args).await,
SubCommands::Start(args) => start::handle_command(args, mp).await,
SubCommands::System(args) => system::handle_command(args, mp).await,
SubCommands::MarkdownHelp => {
clap_markdown::print_help_markdown::<Application>();
Ok(())
Expand Down
Loading

0 comments on commit f277513

Please sign in to comment.