Skip to content

fix: remove unnecessary async from root and health endpoints#2126

Merged
qin-ctx merged 1 commit into
volcengine:mainfrom
xiejianqiao:fix/remove-unnecessary-async
May 19, 2026
Merged

fix: remove unnecessary async from root and health endpoints#2126
qin-ctx merged 1 commit into
volcengine:mainfrom
xiejianqiao:fix/remove-unnecessary-async

Conversation

@xiejianqiao
Copy link
Copy Markdown
Contributor

## Description                                                                                                                                                             
                                                                                                                                                                           
Remove unnecessary `async` keywords from the `root()` and `health()` endpoints in the FastAPI server. Neither function performs any asynchronous operations, so declaring  them as `async def` adds unnecessary event loop overhead.                                                                                                                    
                                                                                                                                                                           
## Related Issue                                                                                                                                                           
                                                                                                                                                                           
N/A                                                                                                                                                                        
                                                                                                                                                                           
## Type of Change                                                                                                                                                          
                                                                                                                                                                           
- [ ] Bug fix (non-breaking change that fixes an issue)                                                                                                                    
- [ ] New feature (non-breaking change that adds functionality)                                                                                                            
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)                                                                     
- [ ] Documentation update                                                                                                                                                 
- [ ] Refactoring (no functional changes)                                                                                                                                  
- [x] Performance improvement                                                                                                                                              
- [ ] Test update                                                                                                                                                          
                                                                                                                                                                           
## Changes Made                                                                                                                                                            
                                                                                                                                                                           
- Removed `async` keyword from `root()` endpoint in `server_fastapi.py`                                                                                                    
- Removed `async` keyword from `health()` endpoint in `server_fastapi.py`                                                                                                  
                                                                                                                                                                           
## Testing                                                                                                                                                                 
                                                                                                                                                                           
- [ ] I have added tests that prove my fix is effective or that my feature works                                                                                           
- [ ] New and existing unit tests pass locally with my changes                                                                                                             
- [ ] I have tested this on the following platforms:                                                                                                                       
  - [ ] Linux                                                                                                                                                              
  - [x] macOS                                                                                                                                                              
  - [ ] Windows                                                                                                                                                            
                                                                                                                                                                           
## Checklist                                                                                                                                                               
                                                                                                                                                                           
- [x] My code follows the project's coding style                                                                                                                           
- [x] I have performed a self-review of my code                                                                                                                            
- [ ] I have commented my code, particularly in hard-to-understand areas                                                                                                   
- [ ] I have made corresponding changes to the documentation                                                                                                               
- [x] My changes generate no new warnings                                                                                                                                  
- [x] Any dependent changes have been merged and published                                                                                                                 
                                                                                                                                                                           
## Screenshots (if applicable)                                                                                                                                             
                                                                                                                                                                           
N/A                                                                                                                                                                        
                                                                                                                                                                           
## Additional Notes                                                                                                                                                        
                                                                                                                                                                           
This is a pure refactoring change with no impact on existing functionality or behavior.

@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🏅 Score: 100
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@qin-ctx qin-ctx merged commit 1105efd into volcengine:main May 19, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants