From a5dd0a40792b91657c2f18dbce669f73615d3859 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 27 Aug 2026 00:22:30 +0800 Subject: [PATCH] =?UTF-8?q?diag:=20poller=20=E6=B3=A8=E5=86=8C/=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E9=93=BE=E8=B7=AF=E5=8A=A0=E6=97=A5=E5=BF=97=EF=BC=88?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=20rounds=3D0=EF=BC=9A=E6=98=AF=E6=9C=AA?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E8=BF=98=E6=98=AF=E5=BE=AA=E7=8E=AF=E6=9C=AA?= =?UTF-8?q?=E8=B7=91=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_bidding/bid_flow.py | 6 ++++++ pipeline_bidding/init.py | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pipeline_bidding/bid_flow.py b/pipeline_bidding/bid_flow.py index 44b6a52..672949b 100644 --- a/pipeline_bidding/bid_flow.py +++ b/pipeline_bidding/bid_flow.py @@ -336,6 +336,7 @@ def start_poller(): async def _bid_poller(app): async def _loop(): db, dbname = get_db() + POLLER_STATE["last_error"] = "" while True: try: async def _once(): @@ -363,6 +364,11 @@ def start_poller(): logger.warning("bid_poller error/timeout: %s", str(e)[:200]) await asyncio.sleep(POLL_INTERVAL) + try: + from appPublic.log import debug as _dbg0 + _dbg0("bid_flow poller handler invoked, creating loop task") + except Exception: + pass asyncio.create_task(_loop()) try: from appPublic.log import debug as _dbg diff --git a/pipeline_bidding/init.py b/pipeline_bidding/init.py index 1a50309..604d2e2 100644 --- a/pipeline_bidding/init.py +++ b/pipeline_bidding/init.py @@ -46,7 +46,13 @@ def load_pipeline_bidding(): if mode in ("all", "worker"): try: from .bid_flow import start_poller - start_poller() + r = start_poller() + try: + from appPublic.log import debug as _dbg + _dbg("[pipeline_bidding] poller register result: %s (PIPELINE_MODE=%s)" % (r, mode)) + except Exception: + pass + logger.info("[pipeline_bidding] poller register: %s (mode=%s)", r, mode) except Exception as e: logger.warning("[pipeline_bidding] poller 启动失败: %s", str(e)[:200]) ok = False