Skip to content
Snippets Groups Projects
Verified Commit 39209f51 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Use asyncio.run for running PDF generation

parent 8d058ce7
No related branches found
No related tags found
No related merge requests found
Pipeline #83596 failed
......@@ -64,9 +64,7 @@ def generate_pdf(
pdf_path = os.path.join(temp_dir, "print.pdf")
lang = lang or get_language()
asyncio.get_event_loop().run_until_complete(
_generate_pdf_with_chromium(temp_dir, pdf_path, html_url, lang)
)
asyncio.run(_generate_pdf_with_chromium(temp_dir, pdf_path, html_url, lang))
# 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