refactor: remove KI-Orakel from history page and backend
Drop oracle UI, API endpoint, scheduled generation, and related docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+4
-14
@@ -1,36 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Regenerate cached AI texts (motivation + oracle)."""
|
||||
"""Regenerate cached AI texts (motivation)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import asyncio
|
||||
|
||||
from server.ai import generate_daily_motivation, generate_oracle
|
||||
from server.ai import generate_daily_motivation
|
||||
from server.config_loader import load_meds_config
|
||||
from server.db import get_db
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
parser = argparse.ArgumentParser(description="Regenerate cached AI texts")
|
||||
parser.add_argument("--motivation", action="store_true", help="Regenerate today's motivation")
|
||||
parser.add_argument("--oracle", action="store_true", help="Regenerate today's oracle")
|
||||
parser.add_argument("--force", action="store_true", help="Regenerate even if cache exists")
|
||||
args = parser.parse_args()
|
||||
|
||||
if not args.motivation and not args.oracle:
|
||||
args.motivation = True
|
||||
args.oracle = True
|
||||
|
||||
config = load_meds_config()
|
||||
db = await get_db()
|
||||
try:
|
||||
if args.motivation:
|
||||
result = await generate_daily_motivation(db, config.timezone, force=args.force)
|
||||
print("motivation:", result)
|
||||
if args.oracle:
|
||||
result = await generate_oracle(db, config.timezone, force=args.force)
|
||||
print("oracle:", result)
|
||||
result = await generate_daily_motivation(db, config.timezone, force=args.force)
|
||||
print("motivation:", result)
|
||||
finally:
|
||||
await db.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user