Add output paths to callback template parameters
This would be useful when there might be a lot of output and you want
to do something with it like keep a separate log of all the commands
that were run with their output
@@ -85,6 +85,12 @@ impl TaskHandler {
parameters.insert("stderr", "".to_string());
}
+ let (out_path, err_path) = get_log_paths(task.id, &self.pueue_directory);
+ // Using Display impl of PathBuf which isn't necessarily a perfect
+ // representation of the path but should work for most cases here
+ parameters.insert("stdout_path", out_path.display().to_string());
+ parameters.insert("stderr_path", err_path.display().to_string());
+
// Get the exit code
if let TaskStatus::Done(result) = &task.status {
match result {
