refactor: improve code logic and format in app remote sync task#11691
refactor: improve code logic and format in app remote sync task#11691zhengkunwang223 merged 3 commits into1Panel-dev:dev-v2from
Conversation
- Introduced a new `syncAppStoreTask` function to handle the synchronization of applications from the AppStore. - The function checks for updates, retrieves the application list, and manages the synchronization process, including downloading app icons and updating app details. - Refactored the existing app synchronization logic from `SyncAppListFromRemote` into the new task for improved maintainability and clarity. - Added logging for progress tracking during the synchronization process.
- Introduced `HandleRequestWithClient` function to allow custom HTTP clients for requests. - Moved the transport loading logic into the new function for better separation of concerns. - Updated `HandleRequest` to utilize the new function, enhancing flexibility in request handling.
- Replaced direct HTTP request handling with `HandleRequestWithClient` for downloading app icons and Docker Compose files. - Removed unused variables and logging related to icon download updates for cleaner code. - Improved error handling and logging for failed requests.
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@zhengkunwang223 劳烦大佬 review :) |
#11697
What this PR does / why we need it?
优化下载 app 的图标和 compose 时,滥用 http.Client 临时创建导致不必要的开支问题。
Summary of your change
Please indicate you've done the following: