Made it look for all schedules instead of just top 10

This commit is contained in:
Frikky
2023-11-24 14:12:35 +01:00
parent 84bef74faf
commit 4a1e9316a8
3 changed files with 9 additions and 2 deletions
+6 -1
View File
@@ -3573,7 +3573,12 @@ func runInitEs(ctx context.Context) {
log.Printf("[DEBUG] Getting organizations for Elasticsearch/Opensearch")
activeOrgs, err := shuffle.GetAllOrgs(ctx)
log.Printf("[DEBUG] Got %d organizations to look into", len(activeOrgs))
log.Printf("[DEBUG] Got %d organizations to look into. If this is 0, we wait 10 more seconds until DB is ready and try again.", len(activeOrgs))
if len(activeOrgs) == 0 {
time.Sleep(10 * time.Second)
activeOrgs, err = shuffle.GetAllOrgs(ctx)
return
}
setUsers := false
_ = setUsers