Fix cloud sync issue when setup first time
This commit is contained in:
@@ -4940,7 +4940,15 @@ func handleCloudSetup(resp http.ResponseWriter, request *http.Request) {
|
||||
// 2. Add iterative sync schedule for interval seconds
|
||||
// 3. Add another environment for the org's users
|
||||
org.CloudSync = true
|
||||
org.SyncFeatures = responseData.SyncFeatures
|
||||
|
||||
// set cache here for 30 min
|
||||
cacheKey := fmt.Sprintf("org_sync_features_%s", org.Id)
|
||||
featuresBytes, err := json.Marshal(responseData.SyncFeatures)
|
||||
if err != nil {
|
||||
log.Printf("[ERROR] Failed to marshal SyncFeatures for cache: %s", err)
|
||||
} else {
|
||||
shuffle.SetCache(ctx, cacheKey, featuresBytes, 1800)
|
||||
}
|
||||
|
||||
org.SyncConfig = shuffle.SyncConfig{
|
||||
Apikey: responseData.SessionKey,
|
||||
|
||||
Reference in New Issue
Block a user