diff --git a/yama/src/operations/storing.rs b/yama/src/operations/storing.rs index ba63a49..3e0b380 100644 --- a/yama/src/operations/storing.rs +++ b/yama/src/operations/storing.rs @@ -26,7 +26,7 @@ use crossbeam_channel::{Receiver, Sender}; use crossbeam_utils::thread; use log::{error, warn}; -use crate::chunking::{RecursiveChunker, SENSIBLE_THRESHOLD}; +use crate::chunking::{ChunkSubmissionTarget, RecursiveChunker, SENSIBLE_THRESHOLD}; use crate::commands; use crate::commands::{fully_integrate_pointer_node, retrieve_tree_node}; use crate::definitions::{PointerData, RecursiveChunkRef, RootTreeNode, TreeNode}; @@ -83,9 +83,9 @@ pub fn store( } } -pub fn store_worker( +pub fn store_worker( root: &Path, - pile: &Pile, + target: &CST, paths: Receiver, results: Sender<(String, Option)>, ) -> anyhow::Result<()> { @@ -93,7 +93,7 @@ pub fn store_worker( let full_path = root.join(&path); match File::open(&full_path) { Ok(mut file) => { - let mut chunker = RecursiveChunker::new(SENSIBLE_THRESHOLD, pile); + let mut chunker = RecursiveChunker::new(SENSIBLE_THRESHOLD, target); // streaming copy from file to chunker, really cool :) io::copy(&mut file, &mut chunker)?; let chunk_ref = chunker.finish()?;