From 6fbf3566f9cb4578d0f4609148721442db54f72d Mon Sep 17 00:00:00 2001 From: root Date: Wed, 4 Mar 2026 13:31:28 +0000 Subject: [PATCH] fix: add 1s sleep between batches to reduce DB pressure during backfill --- scripts/label_backfill.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/label_backfill.py b/scripts/label_backfill.py index c813845..c34ea00 100644 --- a/scripts/label_backfill.py +++ b/scripts/label_backfill.py @@ -233,6 +233,7 @@ def main(): total += n logger.info(f"本批回填 {n} 条,累计 {total} 条") + time.sleep(1) # 限速:每批间隔1秒,减轻DB压力 if not args.loop: break time.sleep(300) # 5分钟