()
| 577 | } |
| 578 | |
| 579 | async lottery() { |
| 580 | const count = await this.lotteryTimes(); |
| 581 | const limit = Math.min(count, Number(process.env.wps_lottery_limit || 5)); |
| 582 | for (let i = 1; i <= limit; i++) { |
| 583 | const ok = await this.tryLotteryOnce(i); |
| 584 | if (!ok) break; |
| 585 | await $.wait(1000, 1800); |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | async run() { |
| 590 | $.log(`\n账号[${this.index}] ${mask(this.openid || this.cacheKey)}`); |
no test coverage detected