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

This commit is contained in:
steve.wei 2024-09-26 23:31:57 +08:00 committed by GitHub
parent 4dc33cc143
commit ae8c6d95a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}