Skip to content

Commit

Permalink
feat(twitter): debug
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Nov 8, 2024
1 parent b2ef174 commit 3ea381e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/routes/twitter/api/web-api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const getAuth = async (retry: number) => {
const token = config.twitter.authToken[index];
const lock = await cache.get(`${lockPrefix}${token}`, false);
if (lock) {
logger.debug(`twitter debug: twitter cookie for token ${token} is locked, retry: ${retry}`);
await new Promise((resolve) => setTimeout(resolve, Math.random() * 500 + 500));
return await getAuth(retry - 1);
} else {
Expand Down

0 comments on commit 3ea381e

Please sign in to comment.