feat: add comments
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-11-24 22:04:07 +01:00
parent 6f04d0cdda
commit eeaf59ac63
Signed by: kjuulh
GPG Key ID: D85D7535F18F35FA

View File

@ -16,19 +16,15 @@ impl ScheduledTasks {
) -> anyhow::Result<()> {
tracing::info!("scheduling: {}", task);
// Get plan
let plan = Plan::new();
let tasks = plan.tasks().await?;
// For task
for task in tasks {
// Check idempotency rules
if !task.should_run().await? {
tracing::debug!(task = task.id(), "skipping run");
continue;
}
// Run task if not valid
tracing::info!(task = task.id(), "executing task");
task.execute().await?;
}