mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-23 21:19:18 -06:00
5
changelog/unreleased/sse-scalability.md
Normal file
5
changelog/unreleased/sse-scalability.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Enhancement: Make sse service scalable
|
||||
|
||||
When running multiple sse instances some events would not be reported to the user. This is fixed.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7382
|
||||
@@ -72,6 +72,9 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
http.RegisteredEvents(_registeredEvents),
|
||||
http.TracerProvider(tracerProvider),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
gr.Add(server.Run, func(_ error) {
|
||||
cancel()
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/go-chi/chi/v5"
|
||||
chimiddleware "github.com/go-chi/chi/v5/middleware"
|
||||
"github.com/google/uuid"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/account"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/cors"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/middleware"
|
||||
@@ -78,7 +79,7 @@ func Server(opts ...Option) (http.Service, error) {
|
||||
),
|
||||
)
|
||||
|
||||
ch, err := events.Consume(options.Consumer, "sse", options.RegisteredEvents...)
|
||||
ch, err := events.Consume(options.Consumer, "sse-"+uuid.New().String(), options.RegisteredEvents...)
|
||||
if err != nil {
|
||||
return http.Service{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user