feat: 포스트를 만들 때 날씨각 캐릭터(해님·구름·달님) 댓글 1~2개 — '날씨각' 표시, 신고·차단 메뉴 없음, 이미 만든 날은 scripts/fill_bot_comments.py
This commit is contained in:
1 parent
d32e24a5ab
commit
98b5c0cbe3
19 files changed
+864
-4
No files matched your search
@@ -0,0 +1,26 @@
|
||||
"""이미 만든 그날 포스트에 캐릭터 댓글을 단다 (기능을 넣은 날 한 번). 이미 달린 포스트는 건너뛴다.
|
||||
python scripts/fill_bot_comments.py 2026-10-27"""
|
||||
import asyncio
|
||||
import os
|
||||
import sys
|
||||
from datetime import date
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from common.database.db_session_manager import DB_SESSION_MNG # noqa: E402
|
||||
from common.enums import ErrorType # noqa: E402
|
||||
from crud.feed_crud import FeedCRUD # noqa: E402
|
||||
from services.bot_comment import fill_bot_comments # noqa: E402
|
||||
from services.feed_service import clear_feed_cache # noqa: E402
|
||||
|
||||
|
||||
async def main(day: date) -> int:
|
||||
err = await fill_bot_comments(day, FeedCRUD())
|
||||
await clear_feed_cache()
|
||||
await DB_SESSION_MNG.stop()
|
||||
print(f"bot comments {day}: {err.name}")
|
||||
return 0 if err is ErrorType.SUCCESS else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(asyncio.run(main(date.fromisoformat(sys.argv[1]))))
|
||||
Reference in new issue
Block a user