mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Add reader.v5.tasks.Task.processed_at.
There was no way to "quickly" get the processed date.
This commit is contained in:
parent
61b3a29ff3
commit
cf50f85986
1 changed files with 7 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue