rename SPC_RETRY_TIME to SPC_DOWNLOAD_RETRIES to clear up what it's doing

sleep 5 seconds between retries
This commit is contained in:
DubbleClick
2025-04-22 12:23:47 +07:00
parent a7adec1341
commit 0b3421e3cd
4 changed files with 19 additions and 18 deletions

View File

@@ -34,7 +34,7 @@ class PhpSource extends CustomSourceBase
// 查找最新的小版本号
$info = json_decode(Downloader::curlExec(
url: "https://www.php.net/releases/index.php?json&version={$major_version}",
retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0)
retries: intval(getenv('SPC_DOWNLOAD_RETRIES') ?: 0)
), true);
if (!isset($info['version'])) {
throw new DownloaderException("Version {$major_version} not found.");