Skip to content

Commit 29939af

Browse files
authored
fix(logs): include unique identifier for logs (#119)
1 parent bdbd3fb commit 29939af

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/models/logs.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66

77
"github.com/dgraph-io/badger/v4"
8+
"github.com/google/uuid"
89

910
"github.com/open-ug/conveyor/pkg/types"
1011
)
@@ -15,7 +16,7 @@ type LogModel struct {
1516

1617
// Generate composite key
1718
func makeKey(pipeline, driver, runid, timestamp string) string {
18-
return fmt.Sprintf("%s|%s|%s|%s", pipeline, driver, runid, timestamp)
19+
return fmt.Sprintf("%s|%s|%s|%s|%s", pipeline, driver, runid, timestamp, uuid.New().String())
1920
}
2021

2122
// Insert log entry

0 commit comments

Comments
 (0)