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:
parent
98b00a3236
commit
8885e2d259
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue