Resolve healthcheck race conditions
This commit is contained in:
@@ -112,7 +112,7 @@ func (s *store) Open(filename string) (out io.ReadSeekCloser, err error) {
|
||||
|
||||
func (s *store) Healthcheck(ctx context.Context) error {
|
||||
var (
|
||||
fname = s.namespace + "/.healthcheck"
|
||||
fname = fmt.Sprintf("%s/.healthcheck_%d", s.namespace, time.Now().UnixNano())
|
||||
buf = &bytes.Buffer{}
|
||||
)
|
||||
|
||||
|
||||
@@ -193,12 +193,13 @@ func Initialize(ctx context.Context, log *zap.Logger, s store.Storer, ws websock
|
||||
zap.Error(err))
|
||||
}
|
||||
|
||||
hcd.Add(objstore.Healthcheck(DefaultObjectStore), "ObjectStore/System")
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
hcd.Add(objstore.Healthcheck(DefaultObjectStore), "ObjectStore/System")
|
||||
}
|
||||
|
||||
DefaultRenderer = Renderer(c.Template)
|
||||
DefaultResourceTranslation = ResourceTranslation()
|
||||
|
||||
Reference in New Issue
Block a user