Skip to content

Commit 992fa52

Browse files
committed
fix: reduce log verbosity
1 parent ed8d47b commit 992fa52

1 file changed

Lines changed: 3 additions & 16 deletions

File tree

src/loki_push.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,9 @@ pub async fn consumer_loop(
8080

8181
loop {
8282
interval.tick().await;
83-
let recv = tokio::time::timeout(interval.period(), async {
84-
rx.recv_many(&mut buffer, config.loki.chunk_size.into())
85-
.await
86-
})
87-
.await;
88-
89-
let open = match recv {
90-
Ok(open) => open,
91-
Err(_) => {
92-
// Because of the interval timing, this shouldn't really come up in multithreaded environments
93-
println!("DEBUG: No logs received, sleeping to prevent starvation.");
94-
sleep(Duration::from_millis(10)).await;
95-
continue;
96-
}
97-
};
98-
83+
let open = rx
84+
.recv_many(&mut buffer, config.loki.chunk_size.into())
85+
.await;
9986
println!("DEBUG: Received {open} logs from redis.");
10087
if open == 0 {
10188
break;

0 commit comments

Comments
 (0)