Browse Source
fix: Prevent potential metadata change events from being lost. (#6066)
pull/6069/head
steve.wei
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
1 deletions
-
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 |
|
|
|
} |
|
|
|
|
|
|
|