From f81b35865d99b35e0ef7ffb40077cd9d46936636 Mon Sep 17 00:00:00 2001 From: Alexander Jung Date: Sun, 20 Dec 2020 18:34:26 +0100 Subject: [PATCH] job/task: Create UUID for active task Signed-off-by: Alexander Jung --- job/task.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/job/task.go b/job/task.go index 68e57c1..ca172a8 100644 --- a/job/task.go +++ b/job/task.go @@ -88,3 +88,8 @@ type ActiveTaskRun struct { CoreIds []int // the exact core numbers this task is using log *log.Logger } + +// UUID returns the Unique ID for the task and run +func (atr *ActiveTaskRun) UUID() string { + return fmt.Sprintf("%s-%s", atr.Task.UUID(), atr.run.Name) +}