use aclose for arq pool shutdown#387
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces deprecated arq_pool.close() calls with arq_pool.aclose() in both the application lifespan and worker shutdown hooks, and adds corresponding unit tests. The feedback highlights that in the new tests, asserting that close is not called is currently unreachable because calling and awaiting a non-async MagicMock would raise a TypeError first. To make these assertions robust, the reviewer suggests mocking close as an AsyncMock as well.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: Yashi248 <yashveldanda2811@gmail.com>
39ffb5b to
492942c
Compare
Review adjudication — ready to mergeReplacing the deprecated Gemini Code Assist findings
Both findings resolved by the author in CIAll code-validating jobs green (backend lint/typecheck/tests/coverage, frontend, docker buildx, license, DCO, secrets-defense). The Merging. |
…-refs (#411) Surfaced merging PR #387 (chore_arq_pool_aclose_deprecation): the smoke job hard-fails on every external-fork PR because forked PRs can't read OPENAI_API_KEY_TEST and the secret sanity-check exit 1s. Captured as infra_smoke_fork_pr_secret_skip; cross-referenced bidirectionally with infra_smoke_reseed_runtime_budget (sibling smoke-red issue) and added a shipped postscript + forward-ref to chore_arq_pool_aclose_deprecation. Signed-off-by: SoundMindsAI <eric.starr@soundminds.ai> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Verification
uv run pytest -o cache_dir=.pytest-cache-local backend/tests/unit/test_main_lifespan.py backend/tests/unit/test_workers.py- 14 passeduv run ruff check backend/app/main.py backend/workers/all.py backend/tests/unit/test_main_lifespan.py backend/tests/unit/test_workers.py- passedrg -n "arq_pool\.close\(\)" backend/app backend/workers- no matches of deprecated calls