From 08267e790b325a637232f4387b188af86238843f Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 15 Aug 2021 17:07:57 +0200 Subject: [PATCH] fix: Minor tweaks Kalshi doesn't print so many messages, algolia uses more efficient version --- src/platforms/kalshi-fetch.js | 6 +++--- src/utils/algolia.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platforms/kalshi-fetch.js b/src/platforms/kalshi-fetch.js index aed2323..47281ad 100644 --- a/src/platforms/kalshi-fetch.js +++ b/src/platforms/kalshi-fetch.js @@ -58,10 +58,10 @@ async function processMarkets(markets) { return result }) //console.log(results.length) - console.log(results.map(result => result.title)) - console.log(results.map(result => result.title).length) + // console.log(results.map(result => result.title)) + // 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))].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) return results //resultsProcessed } diff --git a/src/utils/algolia.js b/src/utils/algolia.js index 9405400..5437c39 100644 --- a/src/utils/algolia.js +++ b/src/utils/algolia.js @@ -6,7 +6,7 @@ import { mongoReadWithReadCredentials } from "./mongo-wrapper.js" import { mergeEverythingInner } from './mergeEverything.js'; 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');