Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func Compute(req sandboxrpc.ComputeRequest) ([]sandboxrpc.ComputeResponse, error) {
idx, err := utils.OpenIndex(false)
if err != nil {
return nil, errors.New("Something went wrong while creating the index: " + err.Error())
}
defer idx.Close()
datums, err := fetchMajesticCSV()
if err != nil {
return nil, err
}
err = utils.UpdateIndex(idx, datums)
if err != nil {
return nil, err
}
return []sandboxrpc.ComputeResponse{utils.ExportStats(idx)}, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.