From 4a867d9f1b5a61581f89c4e30b5d8a97bfaf7ebf Mon Sep 17 00:00:00 2001 From: Frikky Date: Mon, 2 Jun 2025 22:45:07 +0200 Subject: [PATCH] Repush with proper sync url --- backend/go-app/go.sum | 4 ++-- backend/go-app/main.go | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/backend/go-app/go.sum b/backend/go-app/go.sum index d52c6821..154bcdde 100644 --- a/backend/go-app/go.sum +++ b/backend/go-app/go.sum @@ -341,8 +341,8 @@ github.com/sendgrid/sendgrid-go v3.14.0+incompatible h1:KDSasSTktAqMJCYClHVE94Fc github.com/sendgrid/sendgrid-go v3.14.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/shuffle/shuffle-shared v0.8.71 h1:OhiBpIEkn+1+uRs4nn9jPtjdT0dVfVl6VQKtaFzUtZY= -github.com/shuffle/shuffle-shared v0.8.71/go.mod h1:OLAwH/Ym4941Jn5DF1oZaq6iBpmjG2SNrTZ9Xqck5So= +github.com/shuffle/shuffle-shared v0.8.72 h1:HVOsRt83/1k9P+8q1FAxXnDKyROoDAFa1A3MnoRJYb0= +github.com/shuffle/shuffle-shared v0.8.72/go.mod h1:OLAwH/Ym4941Jn5DF1oZaq6iBpmjG2SNrTZ9Xqck5So= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 70bf90ee..eaab40da 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -61,8 +61,8 @@ var baseDockerName = "frikky/shuffle" var registryName = "registry.hub.docker.com" var runningEnvironment = "onprem" -//var syncUrl = "https://shuffler.io" -var syncUrl = "http://localhost:5002" +var syncUrl = "https://shuffler.io" +//var syncUrl = "http://localhost:5002" type retStruct struct { Success bool `json:"success"` @@ -3807,13 +3807,14 @@ func remoteOrgJobHandler(org shuffle.Org, interval int) error { } } + // Check if it's 1/20 times (600 seconds - 10 min on average) + // Only problem: May take time to sync the first time, which is annoying shouldBackupData := false randomNumber := rand.Intn(20) if randomNumber == 0 { shouldBackupData = true } - // Check if it's 1/20 times (600 seconds - 10 min on average) // Just to prevent it from spamming large outbound requests if shouldBackupData { if org.SyncConfig.WorkflowBackup { @@ -4285,7 +4286,10 @@ func runInitEs(ctx context.Context) { } if newresp.StatusCode != 200 { - log.Printf("[WARNING] Failed stopping runs in environment %s. Status code: %d. Body: %s", environment, newresp.StatusCode, string(respBody)) + if !strings.Contains(string(respBody), "is active") { + log.Printf("[WARNING] Failed stopping runs in environment %s. Status code: %d. Body: %s", environment, newresp.StatusCode, string(respBody)) + } + continue }