delay dependant extensions from running

This commit is contained in:
A.Unger
2020-05-25 14:24:13 +02:00
parent 6aeb3db009
commit 5204ecf869
+16 -1
View File
@@ -42,7 +42,6 @@ var (
"reva-users",
"reva-auth-basic",
"reva-auth-bearer",
"reva-sharing",
"reva-storage-home",
"reva-storage-home-data",
"reva-storage-eos",
@@ -55,6 +54,11 @@ var (
"thumbnails",
}
// There seem to be a race condition when reva-sharing needs to read the sharing.json file and the parent folder is not present.
dependants = []string{
"reva-sharing",
}
// Maximum number of retries until getting a connection to the rpc runtime service.
maxRetries int = 10
)
@@ -103,6 +107,17 @@ OUT:
golog.Fatal(err)
}
}
// ugly hack to avoid dependencies.
time.Sleep(2 * time.Second)
for _, v := range dependants {
arg0 := process.NewProcEntry(v, []string{v}...)
var arg1 int
if err := client.Call("Service.Start", arg0, &arg1); err != nil {
golog.Fatal(err)
}
}
}
// AddMicroPlatform adds the micro subcommands to the cli app