MCPcopy
hub / github.com/cortexlabs/cortex / addJSONObjectsToQueue

Function addJSONObjectsToQueue

pkg/enqueuer/helpers.go:53–65  ·  view source on GitHub ↗
(uploader *sqsBatchUploader, jsonMessageList *jsonBuffer)

Source from the content-addressed store, hash-verified

51}
52
53func addJSONObjectsToQueue(uploader *sqsBatchUploader, jsonMessageList *jsonBuffer) error {
54 jsonBytes, err := json.Marshal(jsonMessageList.messageList)
55 if err != nil {
56 return err
57 }
58
59 err = uploader.AddToBatch(randomMessageID(), pointer.String(string(jsonBytes)))
60 if err != nil {
61 return err
62 }
63
64 return nil
65}
66
67func s3IteratorFromLister(awsClient *awslib.Client, s3Lister S3Lister, fn func(string, *s3.Object) (bool, error)) (int64, error) {
68 includeGlobPatterns := make([]glob.Glob, 0, len(s3Lister.Includes))

Callers 2

enqueueS3FileContentsMethod · 0.85
streamJSONToQueueMethod · 0.85

Calls 3

StringFunction · 0.92
randomMessageIDFunction · 0.85
AddToBatchMethod · 0.80

Tested by

no test coverage detected