Skip to content
Snippets Groups Projects
Commit 0ed66417 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Let PDF generation task fail if Chromium doesn't return a success return code

parent 968caaac
No related branches found
No related tags found
1 merge request!464Resolve "Support PDF generation via a headless Chromium running in the background using celery"
Pipeline #7010 failed
......@@ -53,7 +53,10 @@ def generate_pdf(
f"--print-to-pdf={pdf_path}",
html_url,
]
subprocess.run(cmd) # noqa
res = subprocess.run(cmd) # noqa
# Let the task fail on a non-success return code
res.check_returncode()
# Upload PDF file to media storage
with open(pdf_path, "rb") as f:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment