yxmiler commited on
Commit
9bf5fb3
·
verified ·
1 Parent(s): e8b4f0c

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +4 -1
index.js CHANGED
@@ -106,6 +106,9 @@ class TokenManager {
106
  var wafToken = await Utils.extractWaf();
107
  if (wafToken) {
108
  Tokens[currentIndex].aws_waf_token = wafToken;
 
 
 
109
  return;
110
  } else {
111
  console.log("提取aws-waf-token失败");
@@ -121,7 +124,7 @@ class TokenManager {
121
  if (idTokenMatch && idTokenMatch[1]) {
122
  Tokens[currentIndex].idToken = idTokenMatch[1];
123
  }
124
- await this.updateRedisTokens();//最后更新redis数据库缓存
125
  console.log("更新缓存完毕");
126
  }
127
  currentIndex = (currentIndex + 1) % Tokens.length;
 
106
  var wafToken = await Utils.extractWaf();
107
  if (wafToken) {
108
  Tokens[currentIndex].aws_waf_token = wafToken;
109
+ await this.updateCacheTokens();
110
+ this.updateRedisTokens();
111
+ console.log("更新成功",)
112
  return;
113
  } else {
114
  console.log("提取aws-waf-token失败");
 
124
  if (idTokenMatch && idTokenMatch[1]) {
125
  Tokens[currentIndex].idToken = idTokenMatch[1];
126
  }
127
+ this.updateRedisTokens();//最后更新redis数据库缓存,异步
128
  console.log("更新缓存完毕");
129
  }
130
  currentIndex = (currentIndex + 1) % Tokens.length;