mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-23 00:33:28 +01:00
Renamed a missing ServerStates to task_manager.ServerStates
This commit is contained in:
parent
7de699c7fa
commit
1b32423881
@ -148,7 +148,7 @@ def stream(session_id:str, task_id:int):
|
||||
@app.get('/image/stop')
|
||||
def stop(session_id:str=None):
|
||||
if not session_id:
|
||||
if task_manager.current_state == ServerStates.Online or task_manager.current_state == ServerStates.Unavailable:
|
||||
if task_manager.current_state == task_manager.ServerStates.Online or task_manager.current_state == task_manager.ServerStates.Unavailable:
|
||||
return HTTPException(status_code=409, detail='Not currently running any tasks.') # HTTP409 Conflict
|
||||
task_manager.current_state_error = StopAsyncIteration('')
|
||||
return {'OK'}
|
||||
|
Loading…
Reference in New Issue
Block a user