mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-27 20:29:39 +02:00
Add debugging logs to walk.rs and file scanning in scan.rs
- Added `#[derive(Debug)]` to `Batcher` for easier debugging. - Included `tracing::debug` logging for file scanning in `walk.rs`. - Moved `Indexer` initialization in `scan.rs` to align with indexing logic. - Improved traceability by logging file paths during scanning in `scan.rs`.
This commit is contained in:
parent
6b230617df
commit
a2fc38f2c4
2 changed files with 6 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ const BATCH_SIZE: usize = 5;
|
|||
|
||||
type Batch = Vec<PathBuf>;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct Batcher {
|
||||
tx: crossbeam_channel::Sender<Batch>,
|
||||
batch: Batch,
|
||||
|
|
@ -82,6 +83,7 @@ pub fn spawn_senders(
|
|||
match entry {
|
||||
Ok(e) if e.file_type().is_some_and(|ft| ft.is_file()) => {
|
||||
b.push(e.into_path());
|
||||
tracing::debug!("scanning file: {:?}", b);
|
||||
if batch.len() == BATCH_SIZE {
|
||||
let _ = tx.send(std::mem::take(&mut batch));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue