Browse Source

fix: Prevent potential metadata change events from being lost. (#6066)

pull/6069/head
steve.wei 3 months ago
committed by GitHub
parent
commit
ae8c6d95a6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      weed/s3api/s3api_server.go

4
weed/s3api/s3api_server.go

@ -51,6 +51,8 @@ type S3ApiServer struct {
}
func NewS3ApiServer(router *mux.Router, option *S3ApiServerOption) (s3ApiServer *S3ApiServer, err error) {
startTsNs := time.Now().UnixNano()
v := util.GetViper()
signingKey := v.GetString("jwt.filer_signing.key")
v.SetDefault("jwt.filer_signing.expires_after_seconds", 10)
@ -101,7 +103,7 @@ func NewS3ApiServer(router *mux.Router, option *S3ApiServerOption) (s3ApiServer
s3ApiServer.registerRouter(router)
go s3ApiServer.subscribeMetaEvents("s3", time.Now().UnixNano(), filer.DirectoryEtcRoot, []string{option.BucketsPath})
go s3ApiServer.subscribeMetaEvents("s3", startTsNs, filer.DirectoryEtcRoot, []string{option.BucketsPath})
return s3ApiServer, nil
}

Loading…
Cancel
Save