fix: get_abstract_from_elsevier时save_pdf
This commit is contained in:
parent
1f5def2821
commit
22de14fdea
|
|
@ -188,12 +188,12 @@ def get_abstract_from_elsevier(number_of_task:int = 20):
|
||||||
if has_fulltext:
|
if has_fulltext:
|
||||||
paper.has_fulltext = True
|
paper.has_fulltext = True
|
||||||
paper.has_fulltext_xml = True
|
paper.has_fulltext_xml = True
|
||||||
|
save_pdf_from_elsevier(paper)
|
||||||
|
|
||||||
paper.save_file_xml(xml_str)
|
paper.save_file_xml(xml_str)
|
||||||
paper.save(update_fields=["has_abstract",
|
paper.save(update_fields=["has_abstract",
|
||||||
"has_abstract_xml", "has_fulltext",
|
"has_abstract_xml", "has_fulltext",
|
||||||
"has_fulltext_xml", "update_time"])
|
"has_fulltext_xml", "update_time"])
|
||||||
save_pdf_from_elsevier(paper)
|
|
||||||
|
|
||||||
elif res.status_code == 404:
|
elif res.status_code == 404:
|
||||||
paper.save_fail_reason("elsevier_doi_not_found")
|
paper.save_fail_reason("elsevier_doi_not_found")
|
||||||
|
|
@ -269,7 +269,7 @@ def can_send_more(max_running):
|
||||||
|
|
||||||
@shared_task(base=CustomTask)
|
@shared_task(base=CustomTask)
|
||||||
def send_download_fulltext_task(number_of_task=100):
|
def send_download_fulltext_task(number_of_task=100):
|
||||||
qs = Paper.objects.filter(has_fulltext=False, fail_reason=None).exclude(
|
qs = Paper.objects.filter(has_fulltext=False, fail_reason=None, is_oa=True).exclude(
|
||||||
fetch_status='downloading'
|
fetch_status='downloading'
|
||||||
)
|
)
|
||||||
if not qs.exists():
|
if not qs.exists():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue