Skip to content

Commit

Permalink
removed setRunID
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarfda committed Oct 31, 2024
1 parent 0298ae4 commit 5d6bd60
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ee/agent/knapsack/knapsack.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,12 @@ func New(stores map[storage.Store]types.KVStore, flags types.Flags, db *bbolt.DB
return k
}

// SetRunID sets the run ID in the knapsack
func (k *knapsack) setRunID(id string) {
k.slogger.Logger = k.slogger.Logger.With("run_id", id)
k.systemSlogger.Logger = k.systemSlogger.Logger.With("run_id", id)
}

// GetRunID retrieves the run ID from the knapsack
func (k *knapsack) GetRunID() string {
if runID == "" {
runID = ulid.New()
k.setRunID(runID)
k.slogger.Logger = k.slogger.Logger.With("run_id", runID)
k.systemSlogger.Logger = k.systemSlogger.Logger.With("run_id", runID)
}
return runID
}
Expand Down

0 comments on commit 5d6bd60

Please sign in to comment.