Repository navigation
feat(deploy): 백엔드를 Hypercorn으로 실행 (#11) #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
71b8716
feat(backend): run FastAPI with Hypercorn
seonghobae a773629
feat(backend): run FastAPI with Hypercorn
seonghobae b2762c4
fix(backend): CodeRabbit 리뷰 반영(uvicorn 제거·_FILE·workers)
seonghobae 5d3ad6d
chore: sync feat/11-hypercorn with origin
seonghobae 3438346
Merge remote-tracking branch 'refs/remotes/origin/main' into feat/11-…
seonghobae ee45625
fix(deploy): harden hypercorn config + secrets
seonghobae db9656c
fix(backend): CodeRabbit 리뷰 반영(connect_timeout·python_checks·tests)
seonghobae 9d2666a
fix(deploy): CodeRabbit 잔여 코멘트 반영
seonghobae 487d315
fix(tools): python_checks SKIP_DIR_NAMES 불변화
seonghobae 41ee23f
Merge main into Hypercorn branch
seonghobae a554855
Merge remote-tracking branch 'origin/main' into feat/11-hypercorn
seonghobae c2280c1
Merge remote-tracking branch 'origin/main' into feat/11-hypercorn
seonghobae 1d3f8ca
fix: refresh backend locks for Strix dependency findings
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| from __future__ import annotations | ||
|
|
||
| import logging | ||
| import os | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| def _int_env(name: str, default: str) -> int: | ||
| """Parse an integer environment variable with a safe fallback. | ||
|
|
||
| Hypercorn config modules are imported at server startup. A bad env value | ||
| should not crash the process with an unhelpful ValueError. | ||
| """ | ||
|
|
||
| raw = os.getenv(name) | ||
| value = (raw if raw is not None else default).strip() | ||
| try: | ||
| parsed = int(value) | ||
| except ValueError as exc: | ||
| try: | ||
| parsed = int(str(default).strip()) | ||
| except ValueError as default_exc: | ||
| parsed = 1 | ||
| logger.warning( | ||
| "Invalid %s=%r and default=%r; falling back to 1 (%s)", | ||
| name, | ||
| raw, | ||
| default, | ||
| default_exc, | ||
| ) | ||
| else: | ||
| logger.warning( | ||
| "Invalid %s=%r; falling back to default=%r (%s)", | ||
| name, | ||
| raw, | ||
| default, | ||
| exc, | ||
| ) | ||
|
|
||
| return max(1, parsed) | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
|
|
||
| # Prefer explicit hypercorn knob; fall back to a common convention. | ||
| workers = _int_env("HYPERCORN_WORKERS", os.getenv("WEB_CONCURRENCY", "1")) | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.