forked from extern/easydiffusion
Fixe forgotten current_state_error, is now in task_manager
This commit is contained in:
parent
1ec95d42ba
commit
6e9d73ec64
@ -85,9 +85,9 @@ def read_root():
|
|||||||
@app.get('/ping') # Get server and optionally session status.
|
@app.get('/ping') # Get server and optionally session status.
|
||||||
def ping(session_id:str=None):
|
def ping(session_id:str=None):
|
||||||
if not task_manager.render_thread.is_alive(): # Render thread is dead.
|
if not task_manager.render_thread.is_alive(): # Render thread is dead.
|
||||||
if task_manager.current_state_error: raise HTTPException(status_code=500, detail=str(current_state_error))
|
if task_manager.current_state_error: raise HTTPException(status_code=500, detail=str(task_manager.current_state_error))
|
||||||
raise HTTPException(status_code=500, detail='Render thread is dead.')
|
raise HTTPException(status_code=500, detail='Render thread is dead.')
|
||||||
if task_manager.current_state_error and not isinstance(task_manager.current_state_error, StopAsyncIteration): raise HTTPException(status_code=500, detail=str(current_state_error))
|
if task_manager.current_state_error and not isinstance(task_manager.current_state_error, StopAsyncIteration): raise HTTPException(status_code=500, detail=str(task_manager.current_state_error))
|
||||||
# Alive
|
# Alive
|
||||||
response = {'status': str(task_manager.current_state)}
|
response = {'status': str(task_manager.current_state)}
|
||||||
if session_id:
|
if session_id:
|
||||||
|
Loading…
Reference in New Issue
Block a user