Contest caching

This commit is contained in:
Natsu Kagami 2020-02-11 19:32:48 -05:00
parent d9536a96ca
commit 75f4e403df
Signed by: nki
GPG key ID: 73376E117CD20735
3 changed files with 85 additions and 15 deletions

View file

@ -24,6 +24,7 @@ pub use hook::codeforces_info_hook;
pub fn setup(path: &std::path::Path, data: &mut ShareMap, announcers: &mut AnnouncerHandler) {
CfSavedUsers::insert_into(data, path.join("cf_saved_users.yaml"))
.expect("Must be able to set up DB");
data.insert::<hook::ContestCache>(hook::ContestCache::default());
announcers.add("codeforces", announcer::updates);
}