Przeglądaj źródła

fix pair process

zhangchunrui 1 miesiąc temu
rodzic
commit
1d7f62fd3f
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      index.mjs

+ 1 - 2
index.mjs

@@ -291,7 +291,6 @@ async function processTradePair() {
 
   console.log(`其中 ${unsentTradePair.length} 个未发送过`)
   if (!firstRun) {
-    firstRun = false
     // 发送到 Discord
     for (const pair of unsentTradePair) {
       const success = await sendToDiscordTradePair(pair)
@@ -301,9 +300,9 @@ async function processTradePair() {
       // 避免发送过快,稍微延迟
       await new Promise((resolve) => setTimeout(resolve, 500))
     }
-  
     console.log(`处理完成,已发送 ${unsentTradePair.length} 个交易对`)
   } else {
+    firstRun = false
     console.log('第一次运行,不发送交易对')
   }
 }