Fix runtime startup order issues

This commit is contained in:
Benedikt Kulmann
2020-09-30 10:53:02 +02:00
parent d316acad37
commit f5a51cd754
4 changed files with 29 additions and 75 deletions
+2 -8
View File
@@ -2,6 +2,7 @@ package command
import (
"fmt"
"github.com/owncloud/ocis/ocis/pkg/runtime"
"log"
"net"
"net/rpc"
@@ -11,7 +12,6 @@ import (
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/refs/pman/pkg/process"
)
// RunCommand is the entrypoint for the run command.
@@ -40,13 +40,7 @@ func RunCommand(cfg *config.Config) *cli.Command {
log.Fatal("dialing:", err)
}
proc := process.NewProcEntry(os.Args[2], os.Environ(), []string{os.Args[2]}...)
var res int
if err := client.Call("Service.Start", proc, &res); err != nil {
log.Fatal(err)
}
res := runtime.RunService(client, os.Args[2])
fmt.Println(res)
return nil
},
+1 -26
View File
@@ -33,32 +33,7 @@ func Server(cfg *config.Config) *cli.Command {
}
r := runtime.New()
// TODO temporary service startup selection. Should go away and the runtime should take care of it.
return r.Start(append([]string{
"proxy",
"store",
"settings",
"phoenix",
"ocs",
"webdav",
"reva-frontend",
"reva-gateway",
"reva-users",
"reva-auth-basic",
"reva-auth-bearer",
"reva-storage-home",
"reva-storage-home-data",
"reva-storage-eos",
"reva-storage-eos-data",
"reva-storage-oc",
"reva-storage-oc-data",
"reva-storage-public-link",
"reva-storage-metadata",
"accounts",
"glauth",
"konnectd",
"thumbnails",
}, runtime.MicroServices...)...)
return r.Start()
},
}
}