fix: Minor tweaks

Kalshi doesn't print so many messages, algolia uses more efficient version
This commit is contained in:
NunoSempere 2021-08-15 17:07:57 +02:00
parent 13d708fd25
commit 08267e790b
2 changed files with 4 additions and 4 deletions

View File

@ -58,10 +58,10 @@ async function processMarkets(markets) {
return result return result
}) })
//console.log(results.length) //console.log(results.length)
console.log(results.map(result => result.title)) // console.log(results.map(result => result.title))
console.log(results.map(result => result.title).length) // console.log(results.map(result => result.title).length)
console.log([...new Set(results.map(result => result.title))]) console.log([...new Set(results.map(result => result.title))])
console.log([...new Set(results.map(result => result.title))].length) console.log("Number of unique questions: ", [...new Set(results.map(result => result.title))].length)
// console.log([...new Set(results.map(result => result.title))].length) // console.log([...new Set(results.map(result => result.title))].length)
return results //resultsProcessed return results //resultsProcessed
} }

View File

@ -6,7 +6,7 @@ import { mongoReadWithReadCredentials } from "./mongo-wrapper.js"
import { mergeEverythingInner } from './mergeEverything.js'; import { mergeEverythingInner } from './mergeEverything.js';
let cookie = process.env.ALGOLIA_MASTER_API_KEY || getCookie("algolia") let cookie = process.env.ALGOLIA_MASTER_API_KEY || getCookie("algolia")
const client = algoliasearch('96UD3NTQ7L', cookie); // delete this when committing const client = algoliasearch('96UD3NTQ7L', cookie);
const index = client.initIndex('metaforecast'); const index = client.initIndex('metaforecast');