Browse Source

: 增加日志输出

Pchen. 1 month ago
parent
commit
a8fbd6102b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      apis/Corn/StartAutoLepao.js

+ 2 - 1
apis/Corn/StartAutoLepao.js

@@ -51,7 +51,6 @@ class StartAutoLepao extends API {
 
             for (const item of r) {
                 const { name, create_user, student_num, token, uid, school_id, state } = item
-                this.logger.info(`${name}(${student_num})将加入自动乐跑(本小时内随机调度)`)
 
                 const isSuccess = await Redis.get(`lepaoSuccess:${student_num}`)
                 if (isSuccess) {
@@ -62,6 +61,8 @@ class StartAutoLepao extends API {
                 const delayMs = spreadWindowMs > 0 ? Math.floor(Math.random() * spreadWindowMs) : 0
                 const fireAt = nowMs + delayMs
 
+                this.logger.info(`${name}(${student_num})将加入自动乐跑队列(延迟约 ${Math.round(delayMs / 1000)}s)`)
+
                 setTimeout(() => {
                     try {
                         const taskId = `lepao:auto:${fireAt}:${student_num}`