deletes unnecessary file

This commit is contained in:
Michael Beck 2025-04-16 21:40:34 +02:00
parent d6c72265f9
commit 4f8040e9db

View File

@ -1,21 +0,0 @@
import time
from .db import db
from .models import PaperMetadata
def run_scraper():
while True:
with db.app.app_context():
paper = Paper.query.filter_by(status="Pending").first()
if paper:
try:
# Scraping logic (e.g. download PDF)
paper.status = "Done"
paper.file_path = "papers/some_path.pdf"
except Exception as e:
paper.status = "Failed"
paper.error_message = str(e)
db.session.commit()
else:
time.sleep(60)