diff --git a/task/hot_topic/real_estate_story.py b/task/hot_topic/real_estate_story.py index 1c6e9f9..f87a670 100644 --- a/task/hot_topic/real_estate_story.py +++ b/task/hot_topic/real_estate_story.py @@ -9,9 +9,9 @@ from llm import LLMThinkingEngine def story_edit_task(): with SessionLocal() as db: - # 获取昨天至今的最新10条帖子信息 + # 获取今天最新的帖子(限定,最多10条) today_contents = db.query(SourceContent).filter( - SourceContent.create_time >= (datetime.today().replace(hour=0, minute=0, second=0, microsecond=0) - timedelta(days=1)) + SourceContent.create_time >= (datetime.today().replace(hour=0, minute=0, second=0, microsecond=0)) ).order_by(SourceContent.create_time.desc()).limit(10).all() if len(today_contents) == 0: logger.info("story_edit_task finish, content size 0")