mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 07:16:17 +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 **************************************************/
|
/* Load Missing Tweets **************************************************/
|
||||||
|
|
||||||
while (tweetsNeeded.length) {
|
while (tweetsNeeded.length) {
|
||||||
log('Fetching tweets: ' + tweetsNeeded.join(', '));
|
// log('Fetching tweets: ' + tweetsNeeded.join(', '));
|
||||||
const arriving = await Promise.all(chunk(tweetsNeeded, 99).map(twitter));
|
// const arriving = await Promise.all(chunk(tweetsNeeded, 99).map(twitter));
|
||||||
|
const arriving = [];
|
||||||
const tweetsRequested = tweetsNeeded;
|
const tweetsRequested = tweetsNeeded;
|
||||||
tweetsNeeded = [];
|
tweetsNeeded = [];
|
||||||
const loaded = [];
|
const loaded = [];
|
||||||
@ -71,6 +72,7 @@ module.exports = exports = async function tweets (pages) {
|
|||||||
|
|
||||||
const absent = difference(tweetsRequested, loaded);
|
const absent = difference(tweetsRequested, loaded);
|
||||||
for (const id of absent) {
|
for (const id of absent) {
|
||||||
|
if (!id) continue;
|
||||||
if (!hasOwn(twitterBackup, id)) {
|
if (!hasOwn(twitterBackup, id)) {
|
||||||
log.error('Could not find tweet ' + id);
|
log.error('Could not find tweet ' + id);
|
||||||
continue;
|
continue;
|
||||||
|
@ -41,11 +41,12 @@ class TwitterClient {
|
|||||||
|
|
||||||
tweetids = uniq(tweetids.map(parseTweetId));
|
tweetids = uniq(tweetids.map(parseTweetId));
|
||||||
|
|
||||||
let tweetsNeeded = this._missing(tweetids);
|
let tweetsNeeded = this._missing(tweetids).filter(Boolean);
|
||||||
|
|
||||||
while (tweetsNeeded.length) {
|
while (tweetsNeeded.length) {
|
||||||
log('Fetching tweets: ' + tweetsNeeded.join(', '));
|
// log('Fetching tweets: ' + tweetsNeeded.join(', '));
|
||||||
const arriving = await Promise.all(chunk(tweetsNeeded, 99).map(this._lookup));
|
// const arriving = await Promise.all(chunk(tweetsNeeded, 99).map(this._lookup));
|
||||||
|
const arriving = [];
|
||||||
const tweetsRequested = tweetsNeeded;
|
const tweetsRequested = tweetsNeeded;
|
||||||
tweetsNeeded = [];
|
tweetsNeeded = [];
|
||||||
const loaded = [];
|
const loaded = [];
|
||||||
@ -61,6 +62,7 @@ class TwitterClient {
|
|||||||
|
|
||||||
const absent = difference(tweetsRequested, loaded);
|
const absent = difference(tweetsRequested, loaded);
|
||||||
for (const id of absent) {
|
for (const id of absent) {
|
||||||
|
if (!id) continue;
|
||||||
if (!hasOwn(this._backupData, id)) {
|
if (!hasOwn(this._backupData, id)) {
|
||||||
log.error('Could not find tweet ' + id);
|
log.error('Could not find tweet ' + id);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user