improve on the subimsion process with automatic submissions

make sure we give each user uniqe id
This commit is contained in:
Robin Olsen
2026-03-09 13:23:46 +01:00
parent d7c52383be
commit 5c4ecc841c
12 changed files with 319 additions and 184 deletions

View File

@@ -4,6 +4,7 @@ import (
"log/slog"
"github.com/LazyBachelor/LazyPM/internal/models"
"go.mongodb.org/mongo-driver/bson/primitive"
)
type RunLifecycle struct {
@@ -23,9 +24,11 @@ func NewRunLifecycle(app *App, config Config, details models.TaskDetails, iType
collector.recordUserAction(action)
})
var participantID primitive.ObjectID
var store MetricsStore
if config.StatisticsStoragePath != "" {
store = NewFileMetricsStore(config.StatisticsStoragePath, logger)
participantID = app.Stats.GetParticipantID()
store = NewFileMetricsStore(config.StatisticsStoragePath, participantID, logger)
}
return &RunLifecycle{