From a3fbed40ec3833e5465d37f839a3f32082a32ecc Mon Sep 17 00:00:00 2001 From: JOUNGWOOK KWON Date: Mon, 30 Mar 2026 12:41:06 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=5Fpublish=5Fnext=20=EC=A4=91=EB=B3=B5?= =?UTF-8?q?=20=EC=A0=95=EC=9D=98=20=EC=A0=9C=EA=B1=B0=20=E2=80=94=20pendin?= =?UTF-8?q?g=20=EC=9D=B4=EB=8F=99=20=EC=95=88=20=EB=90=98=EB=8D=98=20?= =?UTF-8?q?=EA=B7=BC=EB=B3=B8=20=EC=9B=90=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit upstream의 drafts/ 기반 _publish_next(520줄)가 수정된 originals→pending 버전(257줄)을 덮어쓰고 있었음. Python은 마지막 정의를 사용하므로 originals/에서 pending_review/로 이동이 전혀 안 되던 것. Co-Authored-By: Claude Opus 4.6 --- bots/scheduler.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/bots/scheduler.py b/bots/scheduler.py index 8b98815..4aa41dd 100644 --- a/bots/scheduler.py +++ b/bots/scheduler.py @@ -517,27 +517,7 @@ def _load_article_by_slug(date_str: str, slug: str) -> dict: return {} -def _publish_next(): - drafts_dir = DATA_DIR / 'drafts' - drafts_dir.mkdir(exist_ok=True) - for draft_file in sorted(drafts_dir.glob('*.json')): - try: - article = json.loads(draft_file.read_text(encoding='utf-8')) - if article.get('_pending_openclaw'): - continue - sys.path.insert(0, str(BASE_DIR / 'bots')) - sys.path.insert(0, str(BASE_DIR / 'bots' / 'converters')) - import publisher_bot - import blog_converter - # 변환봇으로 HTML 생성 (이미 변환된 경우 outputs에서 읽음) - html = blog_converter.convert(article, save_file=False) - article['_html_content'] = html - article['_body_is_html'] = True - publisher_bot.publish(article) - draft_file.unlink(missing_ok=True) - break - except Exception as e: - logger.error(f"드래프트 처리 오류 ({draft_file.name}): {e}") +## _publish_next는 257번 줄에 정의됨 (originals → pending_review 이동) def job_analytics_daily():