From d6b32a23eda8aa7fc66fb5022490b2d89b37bbed Mon Sep 17 00:00:00 2001 From: monilprajapati Date: Mon, 6 Oct 2025 19:05:57 +0530 Subject: [PATCH] sub logic in backend --- backend/go-app/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/go-app/main.go b/backend/go-app/main.go index f1d53d63..debb8390 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -3950,6 +3950,14 @@ func remoteOrgJobController(org shuffle.Org, body []byte) error { shuffle.SetCache(ctx, cacheKey, featuresBytes, 1800) } + subscriptionCacheKey := fmt.Sprintf("org_subscriptions_%s", org.Id) + subscriptionsBytes, err := json.Marshal(responseData.Subscriptions) + if err != nil { + log.Printf("[ERROR] Failed to marshal Subscriptions for cache: %s", err) + } else { + shuffle.SetCache(ctx, subscriptionCacheKey, subscriptionsBytes, 1800) + } + for _, job := range responseData.Jobs { err = handleCloudJob(job) if err != nil {