diff --git a/src/app.js b/src/app.js index 1390c9b..f833964 100644 --- a/src/app.js +++ b/src/app.js @@ -57,10 +57,14 @@ export class App { data.tweets = await _.uniqBy(data.tweets.concat(twitterData.tweets.yesterday), 'id') await new GithubHelper(this.config.GITHUB_TOKEN, this.config.GITHUB_CONFIG).run(data) + // eslint-disable-next-line no-console + console.log(`Updated Github repo with new dataset of ${data.tweets.length} for ${data.time.yesterdayDate}`) newData.lastUpdate = data.time.todayDate } newData.lastRun = data.time.now + // eslint-disable-next-line no-console + console.log(`Successful run process, collected ${(twitterData.tweets.yesterday || twitterData.tweets).length} new tweets`) await this.redisClient.hmsetAsync('app', serializeObj(newData)) return true } catch (e) { diff --git a/src/twitter.js b/src/twitter.js index 240974e..19633f4 100644 --- a/src/twitter.js +++ b/src/twitter.js @@ -290,7 +290,7 @@ export class TwitterHelper { if (isMaintenance) await this.switchAuthType() while (count < queries.length) { - const tweets = await this.searchIterate(queries[count], sinceId, maxId, time) + const tweets = await this.searchIterate(decodeURIComponent(queries[count]), sinceId, maxId, time) if (tweets.length) { if (!isMaintenance && !newSinceId) newSinceId = tweets[0].id if (time.yesterdayDate) { diff --git a/test/twitter.test.js b/test/twitter.test.js index e2a388f..ee348ba 100644 --- a/test/twitter.test.js +++ b/test/twitter.test.js @@ -9,7 +9,6 @@ import { import { nativeClone, extractAccounts, - prettyPrint, buildQueries, } from '../src/util' import {