check if pandoc-server fails to start

This commit is contained in:
Akbar Rahman 2024-01-02 17:52:24 +00:00
parent 3a9cc4c0f8
commit 91a57aa8c9
Signed by: alvierahman90
GPG Key ID: 6217899F07CA2BDF

View File

@ -527,6 +527,11 @@ def start_pandoc_server():
break
except requests.ConnectionError:
time.sleep(0.1)
rc = process.poll()
if rc is not None:
print(f"PANDOC SERVER FAILED TO START: {rc=}")
print(process.stdout.read().decode("utf-8"))
raise Exception("Pandoc server failed to start")
elapsed_time = time.time() - start_time
print(f"pandoc-server started {version=} {elapsed_time=}")