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():