You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.Printf("\n\n\nAUTO UPLOAD FUNCTION: EXIT ON PURPOSE TO LOOK FOR GMAIL -> '%s'. Data type: %#v\n\nTYPE: %#v\n\n\n", value.Label, parsedTranslation.Output, reflect.TypeOf(parsedTranslation.Output))
423
-
}
420
+
//if debug {
421
+
// log.Printf("\n\n\nAUTO UPLOAD FUNCTION: EXIT ON PURPOSE TO LOOK FOR GMAIL -> '%s'. Data type: %#v\n\nTYPE: %#v\n\n\n", value.Label, parsedTranslation.Output, reflect.TypeOf(parsedTranslation.Output))
422
+
//}
424
423
425
424
isListRequest:=false
426
425
427
426
// .Output = translated
428
427
// .RawResponse = original (raw)
429
428
//if foundArray, ok := parsedTranslation.Output.([]interface{}); ok {
430
-
log.Printf("[DEBUG] Found list/search output for label '%s'. Array Length: %d", value.Label, len(foundArray))
429
+
ifdebug {
430
+
log.Printf("[DEBUG] Found get/list/search output for label '%s' during upload. Array Length: %d", value.Label, len(foundArray))
shuffle.SetCache(ctx, cacheKey, []byte("true"), 60*60*24*3) // 3 days as we don't want to keep running the same one over and over.
591
605
592
-
//marshalledBody, err := json.Marshal(item)
593
606
marshalledBody, err:=json.Marshal(generatedItem)
594
607
iferr!=nil {
595
608
log.Printf("[ERROR] Failed marshalling item in schemaless output for label %s: %s", value.Label, err)
596
609
continue
597
610
}
598
611
612
+
//if debug {
613
+
// log.Printf("[DEBUG] Uploading '%s' in category '%s' with data %s", foundIdentifier, actualLabel, string(marshalledBody))
614
+
//}
615
+
599
616
datastoreEntry:= shuffle.CacheKeyData{
600
617
Key: foundIdentifier,
601
618
Value: string(marshalledBody),
602
619
Category: actualLabel,
603
620
}
604
621
605
622
allEntries=append(allEntries, datastoreEntry)
606
-
607
623
ifcnt>100 {
608
624
break
609
625
}
@@ -1966,12 +1982,6 @@ func RunActionWrapper(ctx context.Context, user shuffle.User, value shuffle.Cate
1966
1982
missingFields=append(missingFields, field.Key)
1967
1983
}
1968
1984
}
1969
-
1970
-
/*
1971
-
if debug {
1972
-
log.Printf("[DEBUG] Not all required fields were handled (1). Missing: %#v. Should force use of all fields? Handled fields: %3v", missingFields, handledRequiredFields)
1973
-
}
1974
-
*/
1975
1985
}
1976
1986
1977
1987
// Send request to /api/v1/conversation with this data
@@ -2151,6 +2161,38 @@ func RunActionWrapper(ctx context.Context, user shuffle.User, value shuffle.Cate
2151
2161
}
2152
2162
}
2153
2163
2164
+
// Arbitrary lookup of field value in other fields as it may have been
// log.Printf("[WARNING] Parameter file %s%s NOT found or not active. Status: %#v. Err: %s", shuffle.GetSingulStandaloneFilepath(), fileId, file.Status, err)
0 commit comments