Add informers and internal go routines in manager (#2870)
* used manager's Add function in more places * exit when ctx.Done is received in archivePruner go routines * fix manager tests * fix data race * added more gpm function in manager and removed manager from a util function * closed unused channel and stopped ticker after context is done * added log statements * used context.Done inside function instead of stopper channel
This commit is contained in:
@@ -80,7 +80,7 @@ func Run(ctx context.Context, clientGen crd.ClientGeneratorInterface, logger *za
|
||||
}
|
||||
|
||||
// do specialization in other goroutine to prevent blocking in newdeploy
|
||||
go func() {
|
||||
mgr.Add(ctx, func(_ context.Context) {
|
||||
if *specializeOnStart {
|
||||
var specializeReq fetcher.FunctionSpecializeRequest
|
||||
|
||||
@@ -95,7 +95,7 @@ func Run(ctx context.Context, clientGen crd.ClientGeneratorInterface, logger *za
|
||||
}
|
||||
}
|
||||
atomic.StoreUint32(&readyToServe, 1)
|
||||
}()
|
||||
})
|
||||
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/fetch", f.FetchHandler)
|
||||
|
||||
Reference in New Issue
Block a user