Add app_state reload util and add handler for weekday change

This commit is contained in:
Tobias Reisinger 2024-04-24 02:29:53 +02:00
parent 97d9222a39
commit 6414083af0
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
5 changed files with 51 additions and 38 deletions
emgauwa-controller/src

View file

@ -23,3 +23,10 @@ pub async fn app_state_get_notifier(
.await
.map_err(EmgauwaError::from)
}
pub async fn app_state_reload(app_state: &Addr<AppState>) -> Result<(), EmgauwaError> {
app_state
.send(app_state::Reload {})
.await
.map_err(EmgauwaError::from)?
}