Don't panic if check_task runs into an error

This commit is contained in:
2023-04-11 15:27:04 +02:00
parent e12f371340
commit 3ef90c93ae

View File

@@ -114,8 +114,11 @@ async fn main() {
sleep(sleep_duration).await;
// TODO Log the error and continue instead
check_task(&bot, config.reminder_time, &db).await.unwrap();
let result = check_task(&bot, config.reminder_time, &db).await;
if let Err(e) = result {
// TODO Emitting a backtrace would be nice
error!("{}", e);
}
}
});
}