Compare commits

...

2 Commits

Author SHA1 Message Date
caoqianming 6d2f2a452c Merge branch 'main' of http://gitea.xxhhcty.xyz:8080/zcdsj/paper_server 2026-05-06 13:51:58 +08:00
caoqianming 1d8d829797 feat: get_paper_meta_from_openalex 添加软停止
Co-authored-by: Copilot <copilot@github.com>
2026-05-06 13:50:25 +08:00
1 changed files with 14 additions and 13 deletions

View File

@ -112,6 +112,7 @@ def get_paper_meta_from_openalex(publication_year:int, keywords:str="", search:s
papers.append(paper)
Paper.objects.bulk_create(papers, ignore_conflicts=True)
cache.set(cache_key, next_cursor, timeout=None)
if cache.get("get_paper_meta_from_openalex_stop") is not None:
if end_year is None:
end_year = datetime.now().year
if publication_year + 1 <= end_year: