mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01: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
@ -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…
x
Reference in New Issue
Block a user