thrownewError(`Got unexpected status code ${response.statusCode}`);
}
}).catch({code:"ECONNREFUSED"},(_error)=>{
// Scraping server is down, try again in a minute or so
console.warn("WARNING: Scraping server is not reachable! Retrying in a minute...");
returnPromise.try(()=>{
returnPromise.delay(60*1000);
}).then(()=>{
returnattempt();
});
});
});
});
}
}
returnattempt();
returnattempt();
}),
}),
createCombineSequentialStream(),
createCombineSequentialStream(),
createNDJSONParseStream(),
createNDJSONParseStream(),
createSpyStream((item)=>{
createSpyStream((item)=>{
if(item.updatedAt!=null){
if(item.updatedAt!=null){
// TODO: Can this be made significantly more performant by string-sorting the timestamps in ISO format directly, instead of going through a parsing cycle?
// TODO: Can this be made significantly more performant by string-sorting the timestamps in ISO format directly, instead of going through a parsing cycle?