fix: 修复 currentConfig 未定义错误
- 将 currentConfig?.CRON_NEAR_MINUTES 更正为 this.globalConfig?.CRON_NEAR_MINUTES - 修复代码审查发现的变量引用错误 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
af3915311d
commit
2a6e297238
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ export class ProviderPoolManager {
|
||||||
const fileContent = fs.readFileSync(configPath, 'utf-8');
|
const fileContent = fs.readFileSync(configPath, 'utf-8');
|
||||||
const credData = JSON.parse(fileContent);
|
const credData = JSON.parse(fileContent);
|
||||||
const expiryTime = credData.expiry_date || credData.expiry || credData.expires_at;
|
const expiryTime = credData.expiry_date || credData.expiry || credData.expires_at;
|
||||||
const nearExpiryMs = (currentConfig?.CRON_NEAR_MINUTES || 10) * 60 * 1000;
|
const nearExpiryMs = (this.globalConfig?.CRON_NEAR_MINUTES || 10) * 60 * 1000;
|
||||||
if (!expiryTime) {
|
if (!expiryTime) {
|
||||||
// 凭据文件缺少 expiry 字段,无法判断是否快过期,作为安全措施强制刷新
|
// 凭据文件缺少 expiry 字段,无法判断是否快过期,作为安全措施强制刷新
|
||||||
this._log('warn', `Node ${providerStatus.uuid} (${providerType}) has no expiry field. Forcing refresh as safety measure...`);
|
this._log('warn', `Node ${providerStatus.uuid} (${providerType}) has no expiry field. Forcing refresh as safety measure...`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue