Don't panic if check_task runs into an error
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user