Add reader.v5.tasks.Task.processed_at.

There was no way to "quickly" get the processed date.
This commit is contained in:
funilrys 2022-12-03 18:53:41 +01:00
parent 61b3a29ff3
commit cf50f85986
No known key found for this signature in database
GPG Key ID: 0D8BFEF5515C00C6

View File

@ -140,6 +140,13 @@ impl Task {
TaskContent::Dump { .. } => None,
}
}
pub fn processed_at(&self) -> Option<OffsetDateTime> {
match self.events.last() {
Some(TaskEvent::Succeeded { result: _, timestamp }) => Some(*timestamp),
_ => None,
}
}
}
impl IndexUid {