mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-04 03:09:33 -06:00
allow handler to return an error
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -2,7 +2,6 @@ package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"syscall"
|
||||
|
||||
"github.com/owncloud/ocis-accounts/pkg/flagset"
|
||||
@@ -53,8 +52,14 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
logger.Info().Str("service", service.Name()).Msg("Reporting settings bundle to account service")
|
||||
go svc.RegisterSettingsBundles(&logger)
|
||||
return service.Run()
|
||||
}, func(_ error) {
|
||||
fmt.Println("shutting down grpc server")
|
||||
}, func(err error) {
|
||||
if err != nil {
|
||||
logger.Error().Err(err).Msg("account service died")
|
||||
} else {
|
||||
logger.Info().
|
||||
Str("service", service.Name()).
|
||||
Msg("Shutting down server")
|
||||
}
|
||||
cancel()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user