mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic_ws: almost finish implementing access list support
This commit is contained in:
parent
db596b5038
commit
28cc6c261a
5 changed files with 88 additions and 36 deletions
|
|
@ -24,12 +24,18 @@ pub const APP_NAME: &str = "aquatic_ws: WebTorrent tracker";
|
|||
pub fn run(config: Config) -> anyhow::Result<()> {
|
||||
let state = State::default();
|
||||
|
||||
tasks::update_access_list(&config, &mut state.torrent_maps.lock());
|
||||
|
||||
start_workers(config.clone(), state.clone())?;
|
||||
|
||||
loop {
|
||||
::std::thread::sleep(Duration::from_secs(config.cleaning.interval));
|
||||
|
||||
tasks::clean_torrents(&state);
|
||||
let mut torrent_maps = state.torrent_maps.lock();
|
||||
|
||||
tasks::update_access_list(&config, &mut torrent_maps);
|
||||
|
||||
torrent_maps.clean(&config);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue