mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-19 07:07:42 +01:00
commit
28ee5f7d43
@ -18,6 +18,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"errors"
|
||||
@ -45,6 +46,8 @@ type Context struct {
|
||||
cfgMgr comcfg.CfgManager
|
||||
// job life cycle tracker
|
||||
tracker job.Tracker
|
||||
// job logger configs settings map lock
|
||||
lock sync.Mutex
|
||||
}
|
||||
|
||||
// NewContext ...
|
||||
@ -123,6 +126,8 @@ func (c *Context) Build(tracker job.Tracker) (job.Context, error) {
|
||||
}
|
||||
|
||||
// Set loggers for job
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
lg, err := createLoggers(tracker.Job().Info.JobID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user