Don't hang the task if something other than the renderer fails (e.g. model loading)

This commit is contained in:
cmdr2 2022-12-13 11:44:20 +05:30
parent 8e6102ad9a
commit 35571eb14d

View File

@ -372,6 +372,8 @@ def thread_render(device):
session_cache.keep(task.request.session_id, TASK_TTL)
except Exception as e:
task.error = e
task.response = {"status": 'failed', "detail": str(task.error)}
task.buffer_queue.put(json.dumps(task.response))
print(traceback.format_exc())
continue
finally: