Commit 8ecedf4f authored by Hugo Kerstens's avatar Hugo Kerstens

Set scan processing status while waiting for a worker

parent c63f7aed
......@@ -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...')
......@@ -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).one()
report_progress('Importing PDF')
pdf_path = os.path.join(data_directory, 'scans', f'{}.pdf')
output_directory = os.path.join(data_directory, f'{}_data')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment