openlearningtools / opencompetencies

A tool for organizing educational competencies.
MIT License
16 stars 3 forks source link

PDF not generated when remote terminal session closed #122

Closed ehmatthes closed 8 years ago

ehmatthes commented 8 years ago

After uploading the code to generate pdfs of sa_summary, and restarting gunicorn, pdf generation works as long as the terminal is open. Closing the connection to the remote server causes a server error, with the following output in the logs:

Internal Server Error: /sa_summary_pdf/2/
Traceback (most recent call last):
  File "/srv/projects/opencompetencies/venv/lib/python3.4/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/srv/projects/opencompetencies/competencies/views.py", line 82, in sa_summary_pdf
    print('Generating pdf of sa_summary...')
OSError: [Errno 5] Input/output error

This is a more specific reticketing of #120.

ehmatthes commented 8 years ago

Try:

ehmatthes commented 8 years ago

I've read that reportlab is not thread safe, which may play into this.

ehmatthes commented 8 years ago

Closing for now, hopeful this is really fixed.