implement load uuid_resolver

This commit is contained in:
Marin Postma
2021-05-26 20:42:09 +02:00
parent 9278a6fe59
commit e818c33fec
14 changed files with 438 additions and 411 deletions

View File

@ -1,7 +1,7 @@
mod actor;
mod handle_impl;
mod message;
mod store;
pub mod store;
use std::{collections::HashSet, path::PathBuf};

View File

@ -15,7 +15,7 @@ use super::UpdateStore;
use crate::index_controller::{index_actor::IndexActorHandle, UpdateStatus};
#[derive(Serialize, Deserialize)]
struct UpdateEntry {
pub struct UpdateEntry {
uuid: Uuid,
update: UpdateStatus,
}

View File

@ -1,4 +1,4 @@
mod dump;
pub mod dump;
mod codec;
use std::collections::{BTreeMap, HashSet};
@ -115,7 +115,6 @@ impl UpdateStore {
let (notification_sender, notification_receiver) = mpsc::channel(10);
// Send a first notification to trigger the process.
let _ = notification_sender.send(());
Ok((
Self {
@ -138,6 +137,9 @@ impl UpdateStore {
let (update_store, mut notification_receiver) = Self::create(options, path)?;
let update_store = Arc::new(update_store);
// trigger the update loop
let _ = update_store.notification_sender.send(());
// Init update loop to perform any pending updates at launch.
// Since we just launched the update store, and we still own the receiving end of the
// channel, this call is guaranteed to succeed.