feat: get_paper_meta_from_openalex 添加软停止2

This commit is contained in:
caoqianming 2026-05-06 14:17:22 +08:00
parent 6d2f2a452c
commit b826f8f46b
1 changed files with 1 additions and 1 deletions

View File

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