Skip to content

Conversation

@yinheli
Copy link
Contributor

@yinheli yinheli commented Nov 8, 2024

What does this PR do?

  • Refactored to remove duplicate retry expressions by utilizing the getRetryTime() method.
  • Fixed a typo in the log message.

Checklist before merging

If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
If a modification is not involved, please skip it directly.

  • If it's an extension or dependency update, make sure adding related extensions in src/global/test-extensions.php.
  • If you changed the behavior of static-php-cli, update docs in ./docs/.
  • If you updated config/xxx.json content, run bin/spc dev:sort-config xxx.

- Refactored to remove duplicate retry expressions by utilizing the getRetryTime() method.
- Fixed a typo in the log message.
@crazywhalecc crazywhalecc added the kind/framework Issues related to CLI app framework label Nov 8, 2024
}
if ($retry > 0) {
logger()->notice('Retrying curl download ...');
self::curlDown($url, $path, $method, $used_headers, retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This recursive call doesn't seem right. So I updated.

@crazywhalecc crazywhalecc merged commit 3c4d47d into crazywhalecc:main Nov 9, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/framework Issues related to CLI app framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants