From cf50f8598697a5ce44cc86be8e178e0c25e87fb5 Mon Sep 17 00:00:00 2001 From: funilrys Date: Sat, 3 Dec 2022 18:53:41 +0100 Subject: [PATCH] Add reader.v5.tasks.Task.processed_at. There was no way to "quickly" get the processed date. --- dump/src/reader/v5/tasks.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dump/src/reader/v5/tasks.rs b/dump/src/reader/v5/tasks.rs index 125e20559..61397dd24 100644 --- a/dump/src/reader/v5/tasks.rs +++ b/dump/src/reader/v5/tasks.rs @@ -140,6 +140,13 @@ impl Task { TaskContent::Dump { .. } => None, } } + + pub fn processed_at(&self) -> Option { + match self.events.last() { + Some(TaskEvent::Succeeded { result: _, timestamp }) => Some(*timestamp), + _ => None, + } + } } impl IndexUid {