Conversation
[FEATURE] Docker ๊ธฐ๋ฐ Blue/Gren ๋ฌด์ค๋จ๋ฐฐํฌ
[FEATURE] S3 ์ด๋ฏธ์ง ์ฝ๊ธฐ ๊ตฌํ
[FIX] Redis Task ์ค๋ฅ ์์
[FEATURE] CV ๋ถ์ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํ์ผ๋ก OpenAI์ ์ค๋ช ์์ฒญ
There was a problem hiding this comment.
Summary of Changes
Hello @youyeon11, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
์ด PR์ v1.0.0 ๋ฐฐํฌ๋ฅผ ์ํ ๊ฒ์ผ๋ก, ๊ธฐ์กด ์์ ๋ค์ ํตํฉํ๊ณ ์๋ก์ด ๊ธฐ๋ฅ(์์ฐ๋ถ ์ฝ ์์ ์ฑ ๊ฒ์ฌ)์ ์ถ๊ฐํ๋ฉฐ, ์์คํ ์ํคํ ์ฒ๋ฅผ ๊ฐ์ ํ๊ณ ๋ฐฐํฌ ํ๋ก์ธ์ค๋ฅผ ์๋ํํฉ๋๋ค. ์ฃผ์ ๋ณ๊ฒฝ ์ฌํญ์ Redis ์คํธ๋ฆผ ์ฒ๋ฆฌ์ ๊ฒฌ๊ณ ์ฑ ๊ฐํ, OpenAI ์๋น์ค ํตํฉ, ๊ทธ๋ฆฌ๊ณ ๋ธ๋ฃจ/๊ทธ๋ฆฐ ๋ฐฐํฌ ์์คํ ๋์ ์ ๋๋ค.
Highlights
- ์๋ก์ด ๋ฐฐํฌ ์์คํ ๋์ : Docker Compose์ Nginx๋ฅผ ํ์ฉํ ๋ธ๋ฃจ/๊ทธ๋ฆฐ ๋ฐฐํฌ ์คํฌ๋ฆฝํธ ๋ฐ ์ค์ ํ์ผ์ด ์ถ๊ฐ๋์ด ์์ ์ ์ธ ์๋น์ค ์ ๋ฐ์ดํธ๊ฐ ๊ฐ๋ฅํด์ก์ต๋๋ค.
- Redis ์คํธ๋ฆผ ์ฒ๋ฆฌ ๋ก์ง ๊ฐ์ : Redis ํด๋ผ์ด์ธํธ๊ฐ ์ฌ๊ตฌํ๋์ด ์คํธ๋ฆผ ๋ฉ์์ง ๋ฐํ ๋ฐ ์๋น ๋ก์ง์ด ๋์ฑ ๊ฒฌ๊ณ ํด์ก์ผ๋ฉฐ, DLQ(Dead Letter Queue) ์ฒ๋ฆฌ๊ฐ ๊ฐํ๋์์ต๋๋ค.
- OpenAI ๊ธฐ๋ฐ ์์ฐ๋ถ ์ฝ ์์ ์ฑ ๊ฒ์ฌ ๊ธฐ๋ฅ ์ถ๊ฐ: ์ฝ ์ด๋ฏธ์ง ๋ถ์ ๊ฒฐ๊ณผ์ ๋ฐ๋ผ OpenAI API๋ฅผ ์ฌ์ฉํ์ฌ ์์ฐ๋ถ ๋ณต์ฉ ์์ ์ฑ ์ ๋ณด๋ฅผ ์ ๊ณตํ๋ ์๋ก์ด ์๋น์ค๊ฐ ํตํฉ๋์์ต๋๋ค.
- ๋ฐ์ดํฐ ๋ชจ๋ธ ๋ฐ ์๋น์ค ์ธํฐํ์ด์ค ๋ณ๊ฒฝ: JobRequest, JobResult, ImageJob ์คํค๋ง๊ฐ ์ ๋ฐ์ดํธ๋์๊ณ , S3 ์๋น์ค๊ฐ ํ์ผ์ ์ง์ ์ ์ฅํ๋ ๋์ BytesIO ๊ฐ์ฒด๋ฅผ ๋ฐํํ๋๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with ๐ and ๐ on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. โฉ
๐ค Gemini ์ฝ๋ ๋ฆฌ๋ทฐ ๊ฒฐ๊ณผ1. ์ฃผ์ ๋ณ๊ฒฝ ์ฌํญ ์์ฝ ๋ฐ ์๋ ํ์์ด PR์ v1.0.0 ๋ฐฐํฌ๋ฅผ ์ํ ๊ฒ์ผ๋ก, #22, #21, #19, #18 ์ด์์ ๊ด๋ จ๋ ์์ ๋ด์ฉ์ ํฌํจํ๊ณ ์์ต๋๋ค. ๋ณ๊ฒฝ๋ ํ์ผ ๋ชฉ๋ก์ ๋ณด๋ฉด, ๋ฐฐํฌ ์คํฌ๋ฆฝํธ, Docker Compose ์ค์ , Nginx ์ค์ , ์์กด์ฑ ํ์ผ, API ์๋ํฌ์ธํธ, ์๋น์ค ๋ก์ง, ๊ทธ๋ฆฌ๊ณ ํ ์คํธ ์ฝ๋๊น์ง ๊ด๋ฒ์ํ๊ฒ ์์ ๋ ๊ฒ์ผ๋ก ๋ณด์ ๋๋ค. ํต์ฌ์ ์ธ ๋ณ๊ฒฝ ์ฌํญ์ ์ด๋ฏธ์ง ๋ถ์ ์์ ์ Redis Stream์ ํตํด ๋น๋๊ธฐ์ ์ผ๋ก ์ฒ๋ฆฌํ๊ณ , OpenAI API๋ฅผ ํ์ฉํ์ฌ ์์ฐ๋ถ ๋ณต์ฉ ์์ ์ฑ ์ ๋ณด๋ฅผ ์ ๊ณตํ๋ ๊ธฐ๋ฅ ์ถ๊ฐ, ๊ทธ๋ฆฌ๊ณ ๋ฐฐํฌ ์๋ํ๋ฅผ ์ํ CI/CD ํ์ดํ๋ผ์ธ ๊ตฌ์ถ์ผ๋ก ์์ฝ๋ ์ ์์ต๋๋ค. 2. ์ฝ๋ ํ์ง ๋ฐ ๊ฐ๋ ์ฑ
3. ์ ์ฌ์ ๋ฒ๊ทธ ๋ฐ ์ฃ์ง ์ผ์ด์ค
4. ์ฑ๋ฅ ๋ฐ ํจ์จ์ฑ
5. ๋ณด์ ๋ฐ ์ํคํ ์ฒ
|
There was a problem hiding this comment.
Code Review
์ด๋ฒ PR์ ์๋ก์ด ๊ธฐ๋ฅ ์ถ๊ฐ์ ๋ฐฐํฌ๋ฅผ ์ํ ์ค๋น ์์
์ ํฌํจํ๊ณ ์์ต๋๋ค. ์ ๋ฐ์ ์ผ๋ก ๋ง์ ๋ถ๋ถ์ด ๊ฐ์ ๋์์ง๋ง, ๋ช ๊ฐ์ง ์ค์ํ ์์ ์ด ํ์ํด ๋ณด์
๋๋ค. ํนํ Redis Stream์ ์์
์ ๋ฐํํ๋ ๋ก์ง์์ ์์
type์ด ์๋ชป ์ง์ ๋์ด ๋ฉ์์ง๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ฒ๋ฆฌ๋์ง ์๋ ์น๋ช
์ ์ธ ๋ฒ๊ทธ๊ฐ ์์ต๋๋ค. ๋ํ, ๋ฐฐํฌ ์คํฌ๋ฆฝํธ์ ๋ณ์๋ช
์คํ๋ก ์ธํด ๋ฐฐํฌ๊ฐ ์คํจํ ์ ์์ต๋๋ค. ๋น๋๊ธฐ ์ฝ๋์์ ๋๊ธฐ ํจ์๋ฅผ ๋ถ์ ์ ํ๊ฒ ํธ์ถํ์ฌ ์ฑ๋ฅ์ ์ ํ์ํฌ ์ ์๋ ๋ถ๋ถ๊ณผ Pydantic ๋ชจ๋ธ์ ํ๋๋ช
๊ท์น์ด ํ์ด์ฌ ํ์ค(PEP 8)์ ๋ฐ๋ฅด์ง ์๋ ์ ๋ ์์ ์ด ํ์ํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ ๊ฐ ํ์ผ์ ๋จ๊ธด ์ฝ๋ฉํธ๋ฅผ ์ฐธ๊ณ ํด ์ฃผ์ธ์.
| replyQueue=settings.STREAM_RESULT, | ||
| callbackUrl=None, | ||
| contentType="image/jpeg", | ||
| contentType=job_request.contentType, |
There was a problem hiding this comment.
job_request ๊ฐ์ฒด (ํ์
: JobRequest)์๋ contentType ์์ฑ์ด ์์ต๋๋ค. JobRequest ๋ชจ๋ธ ์ ์์ contentType ํ๋๊ฐ ๋๋ฝ๋ ๊ฒ ๊ฐ์ต๋๋ค. ์ด ์ฝ๋๋ ์คํ ์ AttributeError๋ฅผ ๋ฐ์์ํต๋๋ค. JobRequest ์คํค๋ง์ contentType์ ์ถ๊ฐํ๊ณ ์์ฒญ ๋ณธ๋ฌธ์ ํด๋น ํ๋๋ฅผ ํฌํจํ๋๋ก ์์ ํด์ผ ํฉ๋๋ค.
| { | ||
| "type": "image_results", | ||
| "payload": payload, | ||
| "correlationId": correlationId, | ||
| }, |
There was a problem hiding this comment.
Redis Stream์ ๋ฐํํ๋ ์์
์ type์ด ์๋ชป ์ค์ ๋์์ต๋๋ค. ํ์ฌ "image_results"๋ก ์ค์ ๋์ด ์์ผ๋, ์์ปค(app/worker/worker.py)๋ "image_jobs" ํ์
์ ์์
์ ๊ธฐ๋ํ๊ณ ์์ต๋๋ค. ์ด ๋ถ์ผ์น๋ก ์ธํด ์์
์ด ์ฒ๋ฆฌ๋์ง ์๊ณ Dead Letter Queue (DLQ)๋ก ๋ณด๋ด์ง๊ฒ ๋ฉ๋๋ค. ์์
ํ์
์ "image_jobs"๋ก ์์ ํด์ผ ํฉ๋๋ค.
{
"type": "image_jobs",
"payload": payload,
"correlationId": correlationId,
}| redis_client.xgroup_create( | ||
| stream_name=settings.STREAM_JOB, | ||
| group_name=settings.GROUP_NAME, | ||
| ) |
There was a problem hiding this comment.
redis_client.xgroup_create๋ ์ฝ๋ฃจํด(coroutine)์ด๋ฏ๋ก await ํค์๋๋ฅผ ์ฌ์ฉํ์ฌ ํธ์ถํด์ผ ํฉ๋๋ค. await๊ฐ ์์ผ๋ฉด ๊ทธ๋ฃน์ด ์ค์ ๋ก ์์ฑ๋์ง ์์ ์์ปค๊ฐ ์คํธ๋ฆผ ๋ฉ์์ง๋ฅผ ์ฝ์ง ๋ชปํ ์ ์์ต๋๋ค.
| redis_client.xgroup_create( | |
| stream_name=settings.STREAM_JOB, | |
| group_name=settings.GROUP_NAME, | |
| ) | |
| await redis_client.xgroup_create( | |
| stream_name=settings.STREAM_JOB, | |
| group_name=settings.GROUP_NAME, | |
| ) |
deployment/deploy.sh
Outdated
| if docker ps --filter "name=^/app-${AFTER_COLOR}$" --filter "status=running" --format '{{.Names}}' | grep -q .; then | ||
| echo "New app-${AFTER_COLOR} container is running." |
There was a problem hiding this comment.
์คํฌ๋ฆฝํธ์์ AFTER_COLOR๋ผ๋ ๋ณ์๋ฅผ ์ฌ์ฉํ๊ณ ์์ง๋ง, ์ด ๋ณ์๋ ์ ์๋์ง ์์์ต๋๋ค. 14๋ฒ์งธ ๋๋ 19๋ฒ์งธ ์ค์์ ์ ์๋ AFTER_COMPOSE_COLOR๋ฅผ ์ฌ์ฉํด์ผ ํฉ๋๋ค. ์ด ์คํ๋ก ์ธํด ๋ฐฐํฌ ์คํฌ๋ฆฝํธ๊ฐ ์ ์ปจํ
์ด๋์ ์คํ ์ํ๋ฅผ ์ ๋๋ก ํ์ธํ์ง ๋ชปํ๊ณ ์คํจํ๊ฒ ๋ฉ๋๋ค.
| if docker ps --filter "name=^/app-${AFTER_COLOR}$" --filter "status=running" --format '{{.Names}}' | grep -q .; then | |
| echo "New app-${AFTER_COLOR} container is running." | |
| if docker ps --filter "name=^/app-${AFTER_COMPOSE_COLOR}$" --filter "status=running" --format '{{.Names}}' | grep -q .; then | |
| echo "New app-${AFTER_COMPOSE_COLOR} container is running." |
| correlationId = job.correlationId | ||
| payload = json.dumps(job.dict()) |
There was a problem hiding this comment.
์ด ๋ถ๋ถ์๋ ๋ ๊ฐ์ง ๊ฐ์ ์ ์ด ์์ต๋๋ค:
- 30๋ฒ์งธ ์ค์
correlationId = job.correlationIdํ ๋น์ ๋ถํ์ํฉ๋๋ค.correlationId๋ณ์๋ ์ด๋ฏธ ์ด์ ์ ์ ์๋์์ผ๋ฏ๋ก ์ด ์ค์ ์ ๊ฑฐํ ์ ์์ต๋๋ค. - 31๋ฒ์งธ ์ค์์ Pydantic ๋ชจ๋ธ์ ์ง๋ ฌํํ๊ธฐ ์ํด
job.dict()๋ฅผ ์ฌ์ฉํ๊ณ ์๋๋ฐ, ์ด๋ ์ค๋๋(deprecated) ๋ฉ์๋์ ๋๋ค.job.model_dump_json(by_alias=True)์ ์ฌ์ฉํ์ฌ ๋ ๋ช ํํ๊ณ ์์ ํ๊ฒ JSON ๋ฌธ์์ด์ ์์ฑํ๋ ๊ฒ์ด ์ข์ต๋๋ค.
| correlationId = job.correlationId | |
| payload = json.dumps(job.dict()) | |
| payload = job.model_dump_json(by_alias=True) |
| class JobRequest(BaseModel): | ||
| presigned_url: str = Field(..., description="๋ค์ด๋ก๋ํ ์ด๋ฏธ์ง์ Presigned URL") | ||
| presignedUrl: str = Field(..., description="๋ค์ด๋ก๋ํ ์ด๋ฏธ์ง์ Presigned URL") | ||
|
|
||
| """ | ||
| FastAPI๊ฐ image.results Stream์ ๋ฐํํ๋ ๋ฉ์์ง | ||
| """ | ||
| class JobResult(BaseModel): | ||
| pill_name: str | ||
| correlation_id: str | ||
| label: str | ||
| confidence: float | ||
| finished_at: str | ||
| correlationId: str | ||
| pillName: str | ||
| isSafe: int | ||
| description: str | ||
| finishedAt: str | ||
|
|
||
| """ | ||
| Spring์ผ๋ก๋ถํฐ ๋ฐ๋ Job(image.jobs ๊ตฌ๋ ) | ||
| """ | ||
| class ImageJob(BaseModel): | ||
| correlation_id: str = Field(alias="correlationId") | ||
| presigned_url: str = Field(alias="presignedUrl") | ||
| reply_queue: str = Field(alias="replyQueue") | ||
| callback_url: str | None = Field(alias="callbackUrl") | ||
| content_type: str = Field(alias="contentType") | ||
| created_at: str = Field(alias="createdAt") | ||
| ttl_sec: int = Field(alias="ttlSec") | ||
| correlationId: str = Field(alias="correlationId") | ||
| presignedUrl: str = Field(alias="presignedUrl") | ||
| replyQueue: str = Field(alias="replyQueue") | ||
| contentType: str = Field(alias="contentType") | ||
| createdAt: str = Field(alias="createdAt") | ||
| ttlSec: int = Field(alias="ttlSec") |
There was a problem hiding this comment.
Pydantic ๋ชจ๋ธ๋ค์ ํ๋๋ช
์ด camelCase๋ก ์์ฑ๋์์ต๋๋ค. Python์์๋ PEP 8 ์คํ์ผ ๊ฐ์ด๋์ ๋ฐ๋ผ snake_case๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ํ์ค์
๋๋ค. ์ธ๋ถ ์์คํ
๊ณผ์ JSON ๋ฐ์ดํฐ ๊ตํ์ ์ํด camelCase๊ฐ ํ์ํ๋ค๋ฉด, Python ์ฝ๋ ๋ด์์๋ snake_case๋ฅผ ์ฌ์ฉํ๊ณ Pydantic์ Field(alias=...)๋ฅผ ํตํด JSON ํ๋๋ช
์ ๋งคํํ๋ ๊ฒ์ด ๊ฐ์ฅ ์ข์ ๋ฐฉ๋ฒ์
๋๋ค. ์ด๋ ๊ฒ ํ๋ฉด Python ์ฝ๋์ ๊ฐ๋
์ฑ๊ณผ ์ผ๊ด์ฑ์ ์ ์งํ๋ฉด์ ์ธ๋ถ API์์ ํธํ์ฑ์ ๋ณด์ฅํ ์ ์์ต๋๋ค.
class JobRequest(BaseModel):
presigned_url: str = Field(..., alias="presignedUrl", description="๋ค์ด๋ก๋ํ ์ด๋ฏธ์ง์ Presigned URL")
"""
FastAPI๊ฐ image.results Stream์ ๋ฐํํ๋ ๋ฉ์์ง
"""
class JobResult(BaseModel):
correlation_id: str = Field(alias="correlationId")
pill_name: str = Field(alias="pillName")
is_safe: int = Field(alias="isSafe")
description: str
finished_at: str = Field(alias="finishedAt")
"""
Spring์ผ๋ก๋ถํฐ ๋ฐ๋ Job(image.jobs ๊ตฌ๋
)
"""
class ImageJob(BaseModel):
correlation_id: str = Field(alias="correlationId")
presigned_url: str = Field(alias="presignedUrl")
reply_queue: str = Field(alias="replyQueue")
content_type: str = Field(alias="contentType")
created_at: str = Field(alias="createdAt")
ttl_sec: int = Field(alias="ttlSec")| stream_file | ||
| ) | ||
| print(f"[task] Start Asking GPT for job_id={correlationId}") | ||
| description, isSafe = checker.ask_chatgpt_about_pregnancy_safety(pillName) |
There was a problem hiding this comment.
checker.ask_chatgpt_about_pregnancy_safety๋ OpenAI API๋ฅผ ํธ์ถํ๋ ๋๊ธฐ ํจ์์ด๋ฉฐ, ๋คํธ์ํฌ I/O๋ก ์ธํด ์ด๋ฒคํธ ๋ฃจํ๋ฅผ ์ฐจ๋จ(block)ํ ์ ์์ต๋๋ค. asyncio.to_thread๋ฅผ ์ฌ์ฉํ์ฌ ์ด ํจ์๋ฅผ ๋ณ๋์ ์ค๋ ๋์์ ์คํํจ์ผ๋ก์จ ์ ํ๋ฆฌ์ผ์ด์
์ ์๋ต์ฑ์ ์ ์งํด์ผ ํฉ๋๋ค.
| description, isSafe = checker.ask_chatgpt_about_pregnancy_safety(pillName) | |
| description, isSafe = await asyncio.to_thread(checker.ask_chatgpt_about_pregnancy_safety, pillName) |
| """ | ||
| ์ด๋ฏธ์ง๋ฅผ ๋ค์ด -> ๋ค์ด ํ ๊ฒ์ ๋ํ์ฌ ๋ชจ๋ธ ๋ถ์ ์์ฒญ | ||
| """ | ||
| async def process_image_scan(job: ImageJob, redis_client: redis.Redis): |
There was a problem hiding this comment.
process_image_scan ํจ์์ redis_client ํ๋ผ๋ฏธํฐ ํ์
ํํธ๊ฐ redis.Redis๋ก ๋์ด ์์ง๋ง, ์ค์ ๋ก๋ RedisStreamClient ์ธ์คํด์ค๊ฐ ์ ๋ฌ๋ฉ๋๋ค. RedisStreamClient๋ redis.Redis์ ์๋ธํด๋์ค๊ฐ ์๋๋ฏ๋ก, ์ด๋ ํ์
๋ถ์ผ์น์
๋๋ค. ์ฝ๋์ ๋ช
ํ์ฑ๊ณผ ์ ์ ๋ถ์ ๋๊ตฌ์์ ํธํ์ฑ์ ์ํด ํ์
ํํธ๋ฅผ RedisStreamClient๋ก ์์ ํ๋ ๊ฒ์ด ์ข์ต๋๋ค. ์ด๋ฅผ ์ํด ํ์ผ ์๋จ์ from app.worker.redis_client import RedisStreamClient ์ํฌํธ๊ฐ ํ์ํ ์ ์์ต๋๋ค.
| async def process_image_scan(job: ImageJob, redis_client: redis.Redis): | |
| async def process_image_scan(job: ImageJob, redis_client: "RedisStreamClient"): |
| """ | ||
| Redis Stream์ ์ ์ํ ์ ํจํ ํ์ ๋ฉ์์ง๋ฅผ ์ํ ์ ์ฒ๋ฆฌ ํจ์ | ||
| """ | ||
| def _to_scalr(v): | ||
| # XADD ํ์ฉ ํ์ : str, bytes, int, float | ||
| if isinstance(v, (str, bytes, int, float)): | ||
| return v | ||
| # ๊ทธ ์ธ๋ JSON str | ||
| return json.dumps(v, ensure_ascii=False) | ||
|
|
||
| """ | ||
| Decoding | ||
| """ | ||
| def _decode(b): | ||
| if isinstance(b, (bytes, bytearray)): | ||
| return b.decode() | ||
| else: | ||
| return b | ||
|
|
||
|
|
||
| def _sanitize_fields_for_xadd(fields: dict) -> dict: | ||
| # ์ ์ | ||
| cleaned = {} | ||
| for k, v in fields.items(): | ||
| k = _decode(k) | ||
| if isinstance(v, (bytes, bytearray)): | ||
| try: | ||
| v = v.decode() | ||
| except Exception: | ||
| pass | ||
| else: | ||
| v = _to_scalr(v) | ||
| cleaned[k] = v | ||
| return cleaned |
There was a problem hiding this comment.
์ด ํ์ผ์ ์ ์๋ _to_scalr, _decode, _sanitize_fields_for_xadd ํฌํผ ํจ์๋ค์ app/worker/redis_client.py์ ์๋ _to_scalar, _sanitize_fields_for_xadd์ ๊ธฐ๋ฅ์ ์ผ๋ก ์ค๋ณต๋ฉ๋๋ค. ์ฝ๋ ์ค๋ณต์ ํผํ๊ณ ์ ์ง๋ณด์์ฑ์ ๋์ด๊ธฐ ์ํด, redis_client.py์ ์ ํธ๋ฆฌํฐ ํจ์๋ค์ ์ฌ์ฌ์ฉํ๊ฑฐ๋ ํ ๊ณณ์ผ๋ก ํตํฉํ๋ ๊ฒ์ ๊ณ ๋ คํด ๋ณด์ธ์.
๐ ์์ ๋ชฉ์
๐จ ์ฃผ์ ์์ ๋ด์ฉ