memoryd: sync begins when Honcho is turned on, and conclusions are matched by peer
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
@@ -93,8 +93,8 @@ enum Which {
|
||||
}
|
||||
|
||||
/// With `[honcho]`, read the ledger through and the keys first. Then create what is missing
|
||||
/// under `memory/`, open the index and catch it up, bind the three sockets, and start the Honcho
|
||||
/// worker. The error names what failed.
|
||||
/// under `memory/` (and, the first time, write when sync began), open the index and catch it up,
|
||||
/// bind the three sockets, and start the Honcho worker. The error names what failed.
|
||||
pub fn start(config: Config, log: Log) -> Result<Running, StartError> {
|
||||
let opened = match config.honcho_config()? {
|
||||
Some(honcho) => Some(worker::open(&config, &honcho, &log)?),
|
||||
@@ -102,6 +102,9 @@ pub fn start(config: Config, log: Log) -> Result<Running, StartError> {
|
||||
};
|
||||
let store = Store::new(&config.memory_dir());
|
||||
store.init(&config.memory.soul_starter)?;
|
||||
if let Some(opened) = &opened {
|
||||
opened.begin()?;
|
||||
}
|
||||
let index = Index::open(&config.index_path(), config.index.max_class)?;
|
||||
let (_counts, problems) = index.catch_up(&config.sessions_dir(), &store.path("notes.md"))?;
|
||||
for problem in problems {
|
||||
|
||||
Reference in New Issue
Block a user