Repository navigation
Conversation
…loyment) cpu_worker.py already runs multiple SQS consumer loops as daemon threads in one process/pod (audio preprocess on the main thread, the legacy report-analysis loop on a background thread) - this adds a third thread for the new 5-agent report generation queue instead of standing up a separate Deployment/ScaledObject/IRSA role for it. Same queue-per-thread pattern already established here, reusing the pod's existing DB/Bedrock/ AgentCore Gateway network access and IAM permissions. report_generation_worker.run_loop() (renamed from the private _run_loop) is called directly rather than through start_worker(), since initialize_observability() should only run once per process and cpu_worker.py's own start_worker() already calls it.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
개요
5-Agent 리포트 생성 SQS 워커(
report_generation_worker.py)를 별도 Deployment로 새로 안 만들고, 기존cpu-workerpod 안에 세 번째 폴링 스레드로 얹습니다.cpu_worker.py는 이미 audio-preprocess(메인 스레드)와 legacy report-analysis(백그라운드 스레드) 두 개의 SQS 큐를 한 pod에서 멀티스레드로 처리하고 있었습니다 - 여기에 같은 패턴으로 세 번째 스레드만 추가했습니다. 새 워커 하나 만들 때마다 Deployment/ScaledObject/IRSA 역할을 새로 파는 대신, 이미 있는 DB/Bedrock/AgentCore Gateway 접근 권한을 그대로 재사용합니다.변경
report_generation_worker.py의 private_run_loop()를 publicrun_loop()로 (cpu_worker.py에서 직접 import해서 스레드로 돌리기 위함 -initialize_observability()중복 호출을 피하려고start_worker()를 통하지 않음)cpu_worker.py의start_worker()에 세 번째 daemon thread 추가검증
pytest tests/179 passedruff check통과import app.workers.cpu_worker정상 (순환 임포트 등 없음)남은 작업 (Infra repo, 별도 PR)
report_generation_queue) 생성SQS_REPORT_GENERATION_QUEUE_URL환경변수 추가