Process config before using it

This commit is contained in:
Joscha 2023-08-07 15:00:13 +02:00
parent 4f69f5cb21
commit 26ee2ff019
3 changed files with 40 additions and 19 deletions

View file

@ -31,6 +31,6 @@ async fn recurring_task(state: &Server) {
pub async fn run(state: Server) {
loop {
recurring_task(&state).await;
tokio::time::sleep(state.config.repo.update_delay).await;
tokio::time::sleep(state.config.repo_update_delay).await;
}
}

View file

@ -32,8 +32,8 @@ impl Base {
Tab::Queue => "queue",
};
Self {
root: config.web.base(),
repo_name: config.repo.name.clone(),
root: config.web_base.clone(),
repo_name: config.repo_name.clone(),
current: current.to_string(),
}
}