Local Update Neo Peer

This commit is contained in:
mr
2024-10-15 10:51:12 +02:00
parent 5959919ef9
commit a6f546ceee
16 changed files with 123 additions and 113 deletions

View File

@@ -33,14 +33,9 @@ type StatusController struct {
func (o *StatusController) Status() {
var address map[string]string
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &address)
if len(address) == 0 { // default if nothing is send in body
for _, host := range []string{tools.DATACENTERAPI, tools.WORKFLOWAPI, tools.WORKSPACEAPI,
tools.SHAREDAPI, tools.CATALOGAPI, tools.PEERSAPI} {
address[host] = "http://" + host + ":8080/oc"
}
}
api := tools.API{}
state, services, err := api.CheckRemoteAPIs(address) // check if the services are alive
state, services, err := api.CheckRemoteAPIs([]tools.DataType{tools.BOOKING, tools.WORKFLOW, tools.WORKSPACE,
tools.COLLABORATIVE_AREA, tools.DATA_RESOURCE}) // check if the services are alive
errSTR := ""
if err != nil {
errSTR = err.Error()