From 4f18ae3f4dff4f4989c228edd88c5ffdbd3b03ed Mon Sep 17 00:00:00 2001 From: Mikhail Scherba Date: Wed, 4 Sep 2024 12:57:25 +0300 Subject: [PATCH] add GetFailureMessage method Signed-off-by: Mikhail Scherba --- pkg/task/task.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/task/task.go b/pkg/task/task.go index 95b875f2..78fa47b7 100644 --- a/pkg/task/task.go +++ b/pkg/task/task.go @@ -20,6 +20,7 @@ type Task interface { GetId() string GetType() TaskType IncrementFailureCount() + GetFailureMessage() string UpdateFailureMessage(msg string) GetFailureCount() int GetLogLabels() map[string]string @@ -133,6 +134,10 @@ func (t *BaseTask) UpdateFailureMessage(msg string) { t.FailureMessage = msg } +func (t *BaseTask) GetFailureMessage() string { + return t.FailureMessage +} + func (t *BaseTask) GetDescription() string { metaDescription := "" t.lock.RLock()