TaskBot/src/main.rs

28 lines
570 B
Rust

#![allow(unused)]
mod collect;
mod context;
mod reminder;
mod scheduler;
mod task;
mod util;
use context::Context;
async fn run() -> anyhow::Result<()> {
let ctx = Context::new_from_env_or_dev_fallback()?;
let tasks = collect::collect_tasks(&ctx).await?;
scheduler::reschedule_recurring_tasks(&ctx, &tasks).await?;
reminder::remind_all_tasks(&ctx, &tasks).await?;
Ok(())
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
run().await
}