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.
This commit is contained in:
Marty Oehme 2025-06-05 21:51:50 +02:00
parent 98b00a3236
commit 8885e2d259
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -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)