mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-30 23:06:18 +00:00
Disable tweet fetching
This commit is contained in:
parent
91caaa2411
commit
c54b977e54
@ -55,8 +55,9 @@ module.exports = exports = async function tweets (pages) {
|
||||
/* Load Missing Tweets **************************************************/
|
||||
|
||||
while (tweetsNeeded.length) {
|
||||
log('Fetching tweets: ' + tweetsNeeded.join(', '));
|
||||
const arriving = await Promise.all(chunk(tweetsNeeded, 99).map(twitter));
|
||||
// log('Fetching tweets: ' + tweetsNeeded.join(', '));
|
||||
// const arriving = await Promise.all(chunk(tweetsNeeded, 99).map(twitter));
|
||||
const arriving = [];
|
||||
const tweetsRequested = tweetsNeeded;
|
||||
tweetsNeeded = [];
|
||||
const loaded = [];
|
||||
@ -71,6 +72,7 @@ module.exports = exports = async function tweets (pages) {
|
||||
|
||||
const absent = difference(tweetsRequested, loaded);
|
||||
for (const id of absent) {
|
||||
if (!id) continue;
|
||||
if (!hasOwn(twitterBackup, id)) {
|
||||
log.error('Could not find tweet ' + id);
|
||||
continue;
|
||||
|
@ -41,11 +41,12 @@ class TwitterClient {
|
||||
|
||||
tweetids = uniq(tweetids.map(parseTweetId));
|
||||
|
||||
let tweetsNeeded = this._missing(tweetids);
|
||||
let tweetsNeeded = this._missing(tweetids).filter(Boolean);
|
||||
|
||||
while (tweetsNeeded.length) {
|
||||
log('Fetching tweets: ' + tweetsNeeded.join(', '));
|
||||
const arriving = await Promise.all(chunk(tweetsNeeded, 99).map(this._lookup));
|
||||
// log('Fetching tweets: ' + tweetsNeeded.join(', '));
|
||||
// const arriving = await Promise.all(chunk(tweetsNeeded, 99).map(this._lookup));
|
||||
const arriving = [];
|
||||
const tweetsRequested = tweetsNeeded;
|
||||
tweetsNeeded = [];
|
||||
const loaded = [];
|
||||
@ -61,6 +62,7 @@ class TwitterClient {
|
||||
|
||||
const absent = difference(tweetsRequested, loaded);
|
||||
for (const id of absent) {
|
||||
if (!id) continue;
|
||||
if (!hasOwn(this._backupData, id)) {
|
||||
log.error('Could not find tweet ' + id);
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user