feat(twitter): debug

This commit is contained in:
DIYgod 2024-11-09 02:01:24 +08:00
parent b2ef174ebe
commit 3ea381e7db
No known key found for this signature in database
1 changed files with 1 additions and 0 deletions

View File

@ -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 {