move sleep process (fix #5)
This commit is contained in:
parent
1119581d19
commit
88d4474728
10
src/index.js
10
src/index.js
@ -44,6 +44,11 @@ const nodemailer = require("nodemailer");
|
|||||||
var successNum = 0,
|
var successNum = 0,
|
||||||
totalNum = 0;
|
totalNum = 0;
|
||||||
for (key in configs) {
|
for (key in configs) {
|
||||||
|
var delay = Math.round(
|
||||||
|
Math.random() * (maxDelay - minDelay) + minDelay
|
||||||
|
);
|
||||||
|
log.info(`暂停:${delay}毫秒`);
|
||||||
|
await sleep(delay);
|
||||||
totalNum++;
|
totalNum++;
|
||||||
log.info(`${key} - 正在执行配置 ${key}`);
|
log.info(`${key} - 正在执行配置 ${key}`);
|
||||||
log.info(`${key} - 尝试签到……`);
|
log.info(`${key} - 尝试签到……`);
|
||||||
@ -98,11 +103,6 @@ const nodemailer = require("nodemailer");
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var delay = Math.round(
|
|
||||||
Math.random() * (maxDelay - minDelay) + minDelay
|
|
||||||
);
|
|
||||||
log.info(`暂停:${delay}毫秒`);
|
|
||||||
await sleep(delay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (globalConfig.sendMail == true) {
|
if (globalConfig.sendMail == true) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user