Skip to content

Commit

Permalink
Add back Ok printout after producing records (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholastmosher authored Jan 11, 2021
1 parent 04185bb commit b81c6c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/extension-consumer/src/produce/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::path::PathBuf;
use structopt::StructOpt;

use fluvio::{Fluvio, TopicProducer};
use fluvio_types::print_cli_ok;
use crate::common::FluvioExtensionMetadata;
use crate::Result;

Expand Down Expand Up @@ -121,6 +122,7 @@ async fn produce_from_files(
for path in paths {
let bytes = std::fs::read(&path)?;
producer.send_record(&bytes, cfg.partition).await?;
print_cli_ok!();
}
}
FileRecord::Lines(path) => {
Expand All @@ -129,6 +131,7 @@ async fn produce_from_files(
while let Some(Ok(line)) = lines.next() {
producer.send_record(&line, cfg.partition).await?;
}
print_cli_ok!();
}
}

Expand All @@ -140,6 +143,7 @@ async fn produce_stdin(producer: &mut TopicProducer, cfg: ProduceLogConfig) -> R
let mut stdin_lines = BufReader::new(std::io::stdin()).lines();
while let Some(Ok(line)) = stdin_lines.next() {
producer.send_record(&line, cfg.partition).await?;
print_cli_ok!();
}
Ok(())
}

0 comments on commit b81c6c6

Please sign in to comment.