Skip to content

Commit

Permalink
chg: [kunai] refactored var names in main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
qjerome committed Jun 25, 2024
1 parent 2d268a0 commit 69ea3ce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kunai/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ impl EventProducer {
)),
)
.unwrap();
let event_reader = shared.clone();
let event_producer = shared.clone();
let bar = barrier.clone();
let conf = config.clone();

Expand Down Expand Up @@ -1528,13 +1528,13 @@ impl EventProducer {
);

{
let er = event_reader.lock().await;
let ep = event_producer.lock().await;
for ty in Type::variants() {
if ty.is_configurable() {
error!(
"stats {}: {}",
ty,
er.stats.get(&ty, 0).unwrap_or_default()
ep.stats.get(&ty, 0).unwrap_or_default()
);
}
}
Expand All @@ -1546,7 +1546,7 @@ impl EventProducer {
// and is always <= buffers.len()
for buf in buffers.iter().take(events.read) {
let mut dec = EncodedEvent::from_bytes(buf);
let mut er = event_reader.lock().await;
let mut er = event_producer.lock().await;

// we make sure here that only events for which we can grab info for
// are pushed to the pipe. It is simplifying the error handling process
Expand Down Expand Up @@ -1588,7 +1588,7 @@ impl EventProducer {

// only one task needs to reduce
if cpu_id == reducer_cpu_id {
let mut ep = event_reader.lock().await;
let mut ep = event_producer.lock().await;
if ep.has_pending_events() {
ep.process_piped_events().await;
ep.batch += 1;
Expand All @@ -1600,7 +1600,7 @@ impl EventProducer {
bar.wait().await;

// we break the loop if processor is stopped
if event_reader.lock().await.stop {
if event_producer.lock().await.stop {
break;
}
}
Expand Down

0 comments on commit 69ea3ce

Please sign in to comment.