From 9385f07bb59c94c7b26b83e691cb38d673868db2 Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Thu, 30 Aug 2018 14:55:59 +0100 Subject: [PATCH] pixiv: disable lint warning (#598) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #588 token刷新功能建议换成 cron job --- routes/pixiv/token.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/pixiv/token.js b/routes/pixiv/token.js index e3f90111b..37d1c1354 100644 --- a/routes/pixiv/token.js +++ b/routes/pixiv/token.js @@ -73,7 +73,7 @@ async function tokenLoop() { token = res.access_token; let refresh_token = res.refresh_token; let expires_in = res.expires_in * 0.9; - // eslint-disable-next-line no-constant-condition + /* eslint-disable no-constant-condition, no-await-in-loop */ while (true) { await wait(expires_in * 1000); try { @@ -87,6 +87,7 @@ async function tokenLoop() { logger.err(`Pixiv refresh token failed, retry in ${expires_in} seconds.`, err); } } + /* eslint-enable no-await-in-loop */ } }