fix(naver-fetch): ingest 응답 필드 matched→queued (BE async 8e28ce9 정합)
This commit is contained in:
@@ -77,8 +77,9 @@ async def run_cycle(nas, naver, state, settings) -> None:
|
||||
continue
|
||||
try:
|
||||
r = await nas.post_ingest(fetched_at, [{"dong": dong, "articles": articles}])
|
||||
logger.info("ingest dong=%s received=%s new=%s matched=%s",
|
||||
dong, r.get("received"), r.get("new"), r.get("matched"))
|
||||
# BE ingest async화(main 8e28ce9): 응답 {received,new,queued} (matched는 백그라운드라 제거됨)
|
||||
logger.info("ingest dong=%s received=%s new=%s queued=%s",
|
||||
dong, r.get("received"), r.get("new"), r.get("queued"))
|
||||
state.listings_pushed += len(articles)
|
||||
except Exception:
|
||||
logger.exception("listings-ingest 실패 dong=%s", dong)
|
||||
|
||||
@@ -31,7 +31,7 @@ class _FakeNAS:
|
||||
async def post_ingest(self, fetched_at, batches):
|
||||
self.ingests.append({"fetched_at": fetched_at, "batches": batches})
|
||||
n = sum(len(b["articles"]) for b in batches)
|
||||
return {"received": n, "new": n, "matched": 0}
|
||||
return {"received": n, "new": n, "queued": True}
|
||||
|
||||
|
||||
class _FakeNaver:
|
||||
|
||||
Reference in New Issue
Block a user