add constructor for lazy-loading service

This commit is contained in:
Charles Hall 2024-10-08 16:10:30 -07:00
parent 3b28d0cfda
commit a083ff9200
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
2 changed files with 11 additions and 7 deletions

View file

@ -1,5 +1,5 @@
use std::{
collections::{BTreeMap, HashMap},
collections::BTreeMap,
sync::{Arc, Mutex as StdMutex, OnceLock},
};
@ -88,10 +88,7 @@ impl Services {
typing: rooms::edus::typing::Service::new(),
},
event_handler: rooms::event_handler::Service,
lazy_loading: rooms::lazy_loading::Service {
db,
lazy_load_waiting: Mutex::new(HashMap::new()),
},
lazy_loading: rooms::lazy_loading::Service::new(db),
metadata: db,
outlier: db,
pdu_metadata: rooms::pdu_metadata::Service {