Skip to content

Commit

Permalink
tau: save the task before pushing notification
Browse files Browse the repository at this point in the history
  • Loading branch information
dasman committed Oct 22, 2024
1 parent e417fe9 commit e0359bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/tau/taud/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ async fn on_receive_task(
info!(target: "taud", "Save the task: ref: {}", task.ref_id);
task.workspace.clone_from(ws_name);
let datastore_path = expand_path(&settings.datastore)?;
task.save(&datastore_path)?;

// Push a notification to a fifo if set
if settings.piped {
// if we can't load the task then it's a new task.
// otherwise it's a modification.
Expand Down Expand Up @@ -410,7 +413,6 @@ async fn on_receive_task(
}
}
}
task.save(&datastore_path)?;
}
Ok(())
}
Expand Down

0 comments on commit e0359bf

Please sign in to comment.