fix(insta-render): BLMOVE dequeue가 짧은 socket_timeout으로 깨지던 문제 해결

REDIS_URL의 socket_timeout(<5s)이 ReliableQueue BLMOVE 5초 블록보다 짧아
idle dequeue마다 "Timeout reading"으로 잡을 못 꺼내 슬레이트가 draft에 정지(~2026-05-22~).
큐 연결을 socket_timeout=None + socket_keepalive로 생성(make_queue_redis)해 정상화.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 16:08:43 +09:00
parent 9241b5cd90
commit c451f5313b
2 changed files with 26 additions and 1 deletions

View File

@@ -222,3 +222,14 @@ async def test_poll_once_returns_false_on_timeout(monkeypatch):
process_mock.assert_not_awaited()
fake_queue.ack.assert_not_awaited()
fake_queue.fail.assert_not_awaited()
def test_make_queue_redis_no_read_timeout():
"""BLMOVE(블록 5s) dequeue가 read-timeout으로 깨지지 않도록 socket_timeout=None 보장 (회귀 가드)."""
import os, sys
_here = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.dirname(_here)) # services/insta-render
sys.path.insert(0, os.path.dirname(os.path.dirname(_here))) # services (_shared)
import worker
c = worker.make_queue_redis()
assert c.connection_pool.connection_kwargs.get("socket_timeout") is None