Remove debugging prints

TODO: Preserve multi-part extensions as an option?

TODO: Command line args: Limiting concurrency, etc.

Fortune for lazy-rebuild's current commit: Half blessing − 半吉
rust-version
Avril 3 years ago
parent 5115e3b032
commit d37532960c
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -161,8 +161,6 @@ where C: Future<Output = ()> + 'static + Send
}; };
let _h_tx = h_tx; let _h_tx = h_tx;
eprintln!("Got file: {:?}", path);
let mut file = match OpenOptions::new() let mut file = match OpenOptions::new()
.read(true) .read(true)
.open(&path).await { .open(&path).await {
@ -172,7 +170,6 @@ where C: Future<Output = ()> + 'static + Send
return; return;
}, },
}; };
eprintln!("Opened file {:?}",path);
let mut hasher = Sha256::new(); let mut hasher = Sha256::new();
let ring_res = uring_read(&mut file, |buffer| { let ring_res = uring_read(&mut file, |buffer| {
if ret.is_closed() { if ret.is_closed() {
@ -186,11 +183,9 @@ where C: Future<Output = ()> + 'static + Send
async move { async move {
match ring_res { match ring_res {
Ok(_n) => { Ok(_n) => {
eprintln!("Proc {} bytes from {:?}", _n, path);
let _ = ret.send((path, Ok(hasher.into()))).await; let _ = ret.send((path, Ok(hasher.into()))).await;
}, },
Err(e) => { Err(e) => {
eprintln!("Proc for {:?} failed: {}", path, e);
// To prevent DOSing this task, we do not defer the writing of failed results like we used to. If the stream is full, we wait regardless of the result. // To prevent DOSing this task, we do not defer the writing of failed results like we used to. If the stream is full, we wait regardless of the result.
let _ = ret.send((path, Err(e))).await; let _ = ret.send((path, Err(e))).await;

Loading…
Cancel
Save