Small tweaks to make the log more manageable
This commit is contained in:
parent
6346565a1c
commit
965336bf9d
|
@ -141,7 +141,7 @@ async function csetforetell_inner(cookie){
|
|||
"platform": "CSET-foretell",
|
||||
...moreinfo
|
||||
})
|
||||
if(i % 10 == 0){
|
||||
if(i % 30 == 0){
|
||||
console.log(`Page #${i}`)
|
||||
console.log(question)
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ async function csetforetell_inner(cookie){
|
|||
}
|
||||
// let string = JSON.stringify(results,null, 2)
|
||||
// fs.writeFileSync('./data/csetforetell-questions.json', string);
|
||||
console.log(results)
|
||||
// console.log(results)
|
||||
await upsert(results, "csetforetell-questions")
|
||||
|
||||
|
||||
|
|
|
@ -119,5 +119,6 @@ export async function elicit() {
|
|||
await processArray(results.data)
|
||||
}
|
||||
});
|
||||
await sleep(5000) // needed to wait for Papaparse's callback to be executed.
|
||||
}
|
||||
//elicit()
|
||||
|
|
|
@ -72,6 +72,7 @@ export async function metaculus() {
|
|||
console.log(`Query #${i}`)
|
||||
let metaculusQuestions = await fetchMetaculusQuestions(next)
|
||||
let results = metaculusQuestions.results;
|
||||
let j=false
|
||||
for (let result of results) {
|
||||
if (
|
||||
(result.publish_time < now) &&
|
||||
|
@ -128,6 +129,10 @@ export async function metaculus() {
|
|||
if (Number(result.number_of_predictions) >= 10) {
|
||||
// console.log(interestingInfo)
|
||||
all_questions.push(interestingInfo)
|
||||
if(!j && (i %% 20 == 0)){
|
||||
console.log(interestingInfo)
|
||||
j = true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,8 @@ export async function upsert (contents, documentName, collectionName="metaforeca
|
|||
const myDocument = await collection.findOne(filter);
|
||||
|
||||
// Print to the console
|
||||
console.log(myDocument.contentsArray.slice(0,3));
|
||||
console.log(myDocument.contentsArray.slice(0,1
|
||||
));
|
||||
} catch (err) {
|
||||
console.log(err.stack);
|
||||
}
|
||||
|
@ -75,7 +76,7 @@ export async function mongoRead (documentName, collectionName="metaforecastColle
|
|||
finally {
|
||||
await client.close();
|
||||
}
|
||||
console.log(documentContents.slice(0,10));
|
||||
console.log(documentContents.slice(0,1));
|
||||
return documentContents
|
||||
}
|
||||
|
||||
|
@ -113,6 +114,6 @@ export async function mongoReadWithReadCredentials (documentName, collectionName
|
|||
finally {
|
||||
await client.close();
|
||||
}
|
||||
// console.log(documentContents.slice(0,10));
|
||||
// console.log(documentContents.slice(0,1));
|
||||
return documentContents
|
||||
}
|
Loading…
Reference in New Issue
Block a user