diff options
| author | Baitinq <[email protected]> | 2024-06-11 00:34:39 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2024-06-11 00:34:39 +0200 |
| commit | ea50d0281e217b421c2ab8bcaae9a82984750dc0 (patch) | |
| tree | 0f56a47b35899a434b9b6e07e2b150bdb7136e36 | |
| parent | fs-tracer: Handle open files state (diff) | |
| download | fs-tracer-ea50d0281e217b421c2ab8bcaae9a82984750dc0.tar.gz fs-tracer-ea50d0281e217b421c2ab8bcaae9a82984750dc0.tar.bz2 fs-tracer-ea50d0281e217b421c2ab8bcaae9a82984750dc0.zip | |
fs-tracer: cleanup
| -rw-r--r-- | fs-tracer/src/main.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs-tracer/src/main.rs b/fs-tracer/src/main.rs index bc3eae9..bb4b6db 100644 --- a/fs-tracer/src/main.rs +++ b/fs-tracer/src/main.rs @@ -109,15 +109,13 @@ async fn main() -> Result<(), anyhow::Error> { info!("Waiting for threads to stop"); let mut batched_req = vec![]; - let mut i = 0; for elt in resolved_files_recv { batched_req.push(elt); - i += 1; // Batching. TODO: we can probably increase this value but we need to increase max message // in kafka or compress or smth. We should probably batch taking into account the message // size and also sent messages from multiple threads somehow. // We might just need websockets - if i % 4000 != 0 { + if batched_req.len() < 4000 { continue; } let request_body = format!("[{}]", batched_req.join(",")); |