update commands when running in supervised mode

This commit is contained in:
A.Unger
2021-03-10 11:10:46 +01:00
parent 25909d5923
commit 4e37d4a2f6
72 changed files with 1547 additions and 803 deletions

View File

@@ -7,13 +7,13 @@ import (
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/thejerf/suture"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/version"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/spf13/viper"
"github.com/thejerf/suture"
)
var (
@@ -132,6 +132,9 @@ type SutureService struct {
func NewSutureService(ctx context.Context, cfg *ociscfg.Config) suture.Service {
sctx, cancel := context.WithCancel(ctx)
cfg.Accounts.Context = sctx // propagate the context down to the go-micro services.
if cfg.Mode == 0 {
cfg.Accounts.Supervised = true
}
return SutureService{
ctx: sctx,
cancel: cancel,