From 8885e2d2590bb5719571fa687ef5193d6f4db9fc Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 5 Jun 2025 21:51:50 +0200 Subject: [PATCH] Rename article refreshing function a) Is more of what is being done repeatedly, every hour. b) Also implies more can be done (such as removing old articles) and not _just_ an update. --- prophet/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prophet/app.py b/prophet/app.py index ff400ef..be1ae01 100644 --- a/prophet/app.py +++ b/prophet/app.py @@ -190,7 +190,7 @@ def improve_summary(original_title: str, new_title: str, original_summary: str): @app.on_event("startup") @repeat_every(seconds=3600) -def update_articles(): +def refresh_articles(): adding = keep_only_new_originals(grab_latest_originals()) improved = improve_originals(adding) save_new_improvements(improved) @@ -199,7 +199,7 @@ def update_articles(): @app.get("/update") async def fetch_update(): - await update_articles() + await refresh_articles() return json.dumps(improved)