We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed8d47b commit 992fa52Copy full SHA for 992fa52
1 file changed
src/loki_push.rs
@@ -80,22 +80,9 @@ pub async fn consumer_loop(
80
81
loop {
82
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
+ let open = rx
+ .recv_many(&mut buffer, config.loki.chunk_size.into())
+ .await;
99
println!("DEBUG: Received {open} logs from redis.");
100
if open == 0 {
101
break;
0 commit comments