diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-01-03 13:09:35 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-01-03 13:53:43 +0200 |
commit | 543107a70eeffaa6932c87c02b43b0fd4f8558e5 (patch) | |
tree | 2cfb0b9e4dd69f93413d0e934e1113534d7352dc /src/bin | |
parent | e6a4eb6edf83a68a6f73094126804beb0c569937 (diff) | |
download | obnam2-543107a70eeffaa6932c87c02b43b0fd4f8558e5.tar.gz |
feat: load chunk metadata into index at startup
This needs to be replace with a database or something, but it'll do
for now.
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/obnam-server.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/obnam-server.rs b/src/bin/obnam-server.rs index dc8aa82..76d018f 100644 --- a/src/bin/obnam-server.rs +++ b/src/bin/obnam-server.rs @@ -36,7 +36,9 @@ async fn main() -> anyhow::Result<()> { return Err(ConfigError::BadServerAddress.into()); } - let store = IndexedStore::new(&config.chunks); + let mut store = IndexedStore::new(&config.chunks); + store.fill_index()?; + println!("existing generations: {:?}", store.find_generations()); let store = Arc::new(Mutex::new(store)); let store = warp::any().map(move || Arc::clone(&store)); |