diff --git a/zesje/api/scans.py b/zesje/api/scans.py index 88c42c553430f1bdc2a685277211d457e17a2829..d0eecd400d6da8522737f6337a864e37dc265cfe 100644 --- a/zesje/api/scans.py +++ b/zesje/api/scans.py @@ -67,7 +67,7 @@ class Scans(Resource): return dict(status=404, message='Exam does not exist.'), 404 scan = Scan(exam=exam, name=args['pdf'].filename, - status='processing', message='importing PDF') + status='processing', message='Waiting...') db.session.add(scan) db.session.commit() diff --git a/zesje/scans.py b/zesje/scans.py index ab4bc4be549b736f4fb78c70f6ae307041a64ee5..bcbde9f68e30f93eea06f2403cc5d0a35844f6ce 100644 --- a/zesje/scans.py +++ b/zesje/scans.py @@ -67,6 +67,8 @@ def _process_pdf(scan_id, app_config): # Raises exception if zero or more than one scans found scan = Scan.query.filter(Scan.id == scan_id).one() + report_progress('Importing PDF') + pdf_path = os.path.join(data_directory, 'scans', f'{scan.id}.pdf') output_directory = os.path.join(data_directory, f'{scan.exam.id}_data')